Changeset 106414 in webkit


Ignore:
Timestamp:
Jan 31, 2012 5:18:38 PM (12 years ago)
Author:
oliver@apple.com
Message:

Remove unneeded sourceId property
https://bugs.webkit.org/show_bug.cgi?id=77495

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

sourceId isn't used anymore, so we'll just remove it.

  • runtime/Error.cpp:

(JSC):
(JSC::addErrorInfo):
(JSC::hasErrorInfo):

LayoutTests:

Update the test for the removal of sourceId

  • fast/js/exception-properties-expected.txt:
  • fast/js/script-tests/exception-properties.js:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106413 r106414  
     12012-01-31  Oliver Hunt  <oliver@apple.com>
     2
     3        Remove unneeded sourceId property
     4        https://bugs.webkit.org/show_bug.cgi?id=77495
     5
     6        Reviewed by Filip Pizlo.
     7
     8        Update the test for the removal of sourceId
     9
     10        * fast/js/exception-properties-expected.txt:
     11        * fast/js/script-tests/exception-properties.js:
     12
    1132012-01-31  Yuzo Fujishima  <yuzo@google.com>
    214
  • trunk/LayoutTests/fast/js/exception-properties-expected.txt

    r106407 r106414  
    55
    66PASS enumerableProperties(error) is []
    7 PASS enumerableProperties(nativeError) is ["line", "sourceId", "sourceURL", "stack"]
     7PASS enumerableProperties(nativeError) is ["line", "sourceURL", "stack"]
    88PASS Object.getPrototypeOf(nativeError).name is "RangeError"
    99PASS Object.getPrototypeOf(nativeError).message is ""
  • trunk/LayoutTests/fast/js/script-tests/exception-properties.js

    r106407 r106414  
    1717
    1818    shouldBe('enumerableProperties(error)', '[]');
    19     shouldBe('enumerableProperties(nativeError)', '["line", "sourceId", "sourceURL", "stack"]');
     19    shouldBe('enumerableProperties(nativeError)', '["line", "sourceURL", "stack"]');
    2020
    2121    shouldBe('Object.getPrototypeOf(nativeError).name', '"RangeError"');
  • trunk/Source/JavaScriptCore/ChangeLog

    r106407 r106414  
     12012-01-31  Oliver Hunt  <oliver@apple.com>
     2
     3        Remove unneeded sourceId property
     4        https://bugs.webkit.org/show_bug.cgi?id=77495
     5
     6        Reviewed by Filip Pizlo.
     7
     8        sourceId isn't used anymore, so we'll just remove it.
     9
     10        * runtime/Error.cpp:
     11        (JSC):
     12        (JSC::addErrorInfo):
     13        (JSC::hasErrorInfo):
     14
    1152012-01-31  Oliver Hunt  <oliver@apple.com>
    216
  • trunk/Source/JavaScriptCore/runtime/Error.cpp

    r106407 r106414  
    4040
    4141static const char* linePropertyName = "line";
    42 static const char* sourceIdPropertyName = "sourceId";
    4342static const char* sourceURLPropertyName = "sourceURL";
    4443
     
    122121JSObject* addErrorInfo(JSGlobalData* globalData, JSObject* error, int line, const SourceCode& source, const Vector<StackFrame>& stackTrace)
    123122{
    124     intptr_t sourceID = source.provider()->asID();
    125123    const UString& sourceURL = source.provider()->url();
    126124
    127125    if (line != -1)
    128126        error->putDirect(*globalData, Identifier(globalData, linePropertyName), jsNumber(line), ReadOnly | DontDelete);
    129     if (sourceID != -1)
    130         error->putDirect(*globalData, Identifier(globalData, sourceIdPropertyName), jsNumber((double)sourceID), ReadOnly | DontDelete);
    131127    if (!sourceURL.isNull())
    132128        error->putDirect(*globalData, Identifier(globalData, sourceURLPropertyName), jsString(globalData, sourceURL), ReadOnly | DontDelete);
     
    164160{
    165161    return error->hasProperty(exec, Identifier(exec, linePropertyName))
    166         || error->hasProperty(exec, Identifier(exec, sourceIdPropertyName))
    167162        || error->hasProperty(exec, Identifier(exec, sourceURLPropertyName));
    168163}
Note: See TracChangeset for help on using the changeset viewer.