Changeset 88559 in webkit


Ignore:
Timestamp:
Jun 10, 2011 1:33:27 PM (13 years ago)
Author:
barraclough@apple.com
Message:

https://bugs.webkit.org/show_bug.cgi?id=55347
"name" and "message" enumerable on *Error.prototype

Reviewed by Sam Weinig.

This arises from chapter 15 of the spec:

"Every other property described in this clause has the attributes
{ Writable?: true, Enumerable?: false, Configurable?: true }
unless otherwise specified."

Standardized properties are not enumerable.

Source/JavaScriptCore:

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::ErrorInstance):

  • runtime/NativeErrorPrototype.cpp:

(JSC::NativeErrorPrototype::NativeErrorPrototype):

LayoutTests:

  • fast/js/exception-properties-expected.txt: Added.
  • fast/js/exception-properties.html: Added.
  • fast/js/script-tests/exception-properties.js: Added.

(enumerableProperties):

Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r88558 r88559  
     12011-06-10  Gavin Barraclough  <barraclough@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=55347
     6        "name" and "message" enumerable on *Error.prototype
     7
     8        This arises from chapter 15 of the spec:
     9            "Every other property described in this clause has the attributes
     10            { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
     11            unless otherwise specified."
     12        Standardized properties are not enumerable.
     13
     14        * fast/js/exception-properties-expected.txt: Added.
     15        * fast/js/exception-properties.html: Added.
     16        * fast/js/script-tests/exception-properties.js: Added.
     17        (enumerableProperties):
     18
    1192011-06-10  Dimitri Glazkov  <dglazkov@chromium.org>
    220
  • trunk/Source/JavaScriptCore/ChangeLog

    r88520 r88559  
     12011-06-10  Gavin Barraclough  <barraclough@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=55347
     6        "name" and "message" enumerable on *Error.prototype
     7
     8        This arises from chapter 15 of the spec:
     9            "Every other property described in this clause has the attributes
     10            { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
     11            unless otherwise specified."
     12        Standardized properties are not enumerable.
     13
     14        * runtime/ErrorInstance.cpp:
     15        (JSC::ErrorInstance::ErrorInstance):
     16        * runtime/NativeErrorPrototype.cpp:
     17        (JSC::NativeErrorPrototype::NativeErrorPrototype):
     18
    1192011-06-09  Geoffrey Garen  <ggaren@apple.com>
    220
  • trunk/Source/JavaScriptCore/runtime/ErrorInstance.cpp

    r84052 r88559  
    3131{
    3232    ASSERT(inherits(&s_info));
    33     putDirect(*globalData, globalData->propertyNames->message, jsString(globalData, ""));
     33    putDirect(*globalData, globalData->propertyNames->message, jsString(globalData, ""), DontEnum);
    3434}
    3535
     
    3939{
    4040    ASSERT(inherits(&s_info));
    41     putDirect(*globalData, globalData->propertyNames->message, jsString(globalData, message));
     41    putDirect(*globalData, globalData->propertyNames->message, jsString(globalData, message), DontEnum);
    4242}
    4343
  • trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp

    r84052 r88559  
    3535    : JSObjectWithGlobalObject(globalObject, structure)
    3636{
    37     putDirect(exec->globalData(), exec->propertyNames().name, jsString(exec, nameAndMessage), 0);
    38     putDirect(exec->globalData(), exec->propertyNames().message, jsString(exec, nameAndMessage), 0);
     37    putDirect(exec->globalData(), exec->propertyNames().name, jsString(exec, nameAndMessage), DontEnum);
     38    putDirect(exec->globalData(), exec->propertyNames().message, jsString(exec, nameAndMessage), DontEnum);
    3939    putDirect(exec->globalData(), exec->propertyNames().constructor, constructor, DontEnum);
    4040}
Note: See TracChangeset for help on using the changeset viewer.