Changeset 206018 in webkit


Ignore:
Timestamp:
Sep 16, 2016 2:47:46 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

test262: Various Constructors length properties should be configurable
https://bugs.webkit.org/show_bug.cgi?id=161998

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-16
Reviewed by Saam Barati.

JSTests:

  • test262.yaml:

Source/JavaScriptCore:

https://tc39.github.io/ecma262/#sec-ecmascript-standard-built-in-objects
Unless otherwise specified, the length property of a built-in Function
object has the attributes:
{ Writable?: false, Enumerable?: false, Configurable?: true }.

  • runtime/ErrorConstructor.cpp:

(JSC::ErrorConstructor::finishCreation):

  • runtime/JSPromiseConstructor.cpp:

(JSC::JSPromiseConstructor::finishCreation):

  • runtime/MapConstructor.cpp:

(JSC::MapConstructor::finishCreation):

  • runtime/NativeErrorConstructor.cpp:

(JSC::NativeErrorConstructor::finishCreation):

  • runtime/ProxyConstructor.cpp:

(JSC::ProxyConstructor::finishCreation):

  • runtime/SetConstructor.cpp:

(JSC::SetConstructor::finishCreation):

  • runtime/WeakMapConstructor.cpp:

(JSC::WeakMapConstructor::finishCreation):

  • runtime/WeakSetConstructor.cpp:

(JSC::WeakSetConstructor::finishCreation):

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r205974 r206018  
     12016-09-16  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        test262: Various Constructors length properties should be configurable
     4        https://bugs.webkit.org/show_bug.cgi?id=161998
     5
     6        Reviewed by Saam Barati.
     7
     8        * test262.yaml:
     9
    1102016-09-15  Commit Queue  <commit-queue@webkit.org>
    211
  • trunk/JSTests/test262.yaml

    r205969 r206018  
    1954519545  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
    1954619546- path: test262/test/built-ins/Map/length.js
    19547   cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
     19547  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
    1954819548- path: test262/test/built-ins/Map/length.js
    19549   cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
     19549  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
    1955019550- path: test262/test/built-ins/Map/map-iterable-empty-does-not-call-set.js
    1955119551  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], []
     
    2119121191  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    2119221192- path: test262/test/built-ins/NativeErrors/EvalError/length.js
    21193   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
     21193  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
    2119421194- path: test262/test/built-ins/NativeErrors/EvalError/length.js
    21195   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
     21195  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
    2119621196- path: test262/test/built-ins/NativeErrors/EvalError/name.js
    2119721197  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
     
    2123921239  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    2124021240- path: test262/test/built-ins/NativeErrors/RangeError/length.js
    21241   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
     21241  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
    2124221242- path: test262/test/built-ins/NativeErrors/RangeError/length.js
    21243   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
     21243  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
    2124421244- path: test262/test/built-ins/NativeErrors/RangeError/name.js
    2124521245  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
     
    2128721287  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    2128821288- path: test262/test/built-ins/NativeErrors/ReferenceError/length.js
    21289   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
     21289  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
    2129021290- path: test262/test/built-ins/NativeErrors/ReferenceError/length.js
    21291   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
     21291  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
    2129221292- path: test262/test/built-ins/NativeErrors/ReferenceError/name.js
    2129321293  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
     
    2133521335  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    2133621336- path: test262/test/built-ins/NativeErrors/SyntaxError/length.js
    21337   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
     21337  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
    2133821338- path: test262/test/built-ins/NativeErrors/SyntaxError/length.js
    21339   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
     21339  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
    2134021340- path: test262/test/built-ins/NativeErrors/SyntaxError/name.js
    2134121341  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
     
    2138321383  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    2138421384- path: test262/test/built-ins/NativeErrors/TypeError/length.js
    21385   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
     21385  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
    2138621386- path: test262/test/built-ins/NativeErrors/TypeError/length.js
    21387   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
     21387  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
    2138821388- path: test262/test/built-ins/NativeErrors/TypeError/name.js
    2138921389  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
     
    2143121431  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    2143221432- path: test262/test/built-ins/NativeErrors/URIError/length.js
    21433   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
     21433  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
    2143421434- path: test262/test/built-ins/NativeErrors/URIError/length.js
    21435   cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
     21435  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
    2143621436- path: test262/test/built-ins/NativeErrors/URIError/name.js
    2143721437  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
     
    3503135031  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
    3503235032- path: test262/test/built-ins/Promise/length.js
    35033   cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
     35033  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
    3503435034- path: test262/test/built-ins/Promise/length.js
    35035   cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
     35035  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
    3503635036- path: test262/test/built-ins/Promise/name.js
    3503735037  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
     
    3634136341  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
    3634236342- path: test262/test/built-ins/Proxy/length.js
    36343   cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
     36343  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
    3634436344- path: test262/test/built-ins/Proxy/length.js
    36345   cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
     36345  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
    3634636346- path: test262/test/built-ins/Proxy/name.js
    3634736347  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
     
    4031740317  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
    4031840318- path: test262/test/built-ins/Set/length.js
    40319   cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
     40319  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
    4032040320- path: test262/test/built-ins/Set/length.js
    40321   cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
     40321  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
    4032240322- path: test262/test/built-ins/Set/name.js
    4032340323  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
     
    4926349263  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
    4926449264- path: test262/test/built-ins/WeakMap/length.js
    49265   cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
     49265  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
    4926649266- path: test262/test/built-ins/WeakMap/length.js
    49267   cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
     49267  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
    4926849268- path: test262/test/built-ins/WeakMap/name.js
    4926949269  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
     
    4959949599  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
    4960049600- path: test262/test/built-ins/WeakSet/length.js
    49601   cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
     49601  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
    4960249602- path: test262/test/built-ins/WeakSet/length.js
    49603   cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
     49603  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
    4960449604- path: test262/test/built-ins/WeakSet/name.js
    4960549605  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
  • trunk/Source/JavaScriptCore/ChangeLog

    r206011 r206018  
     12016-09-16  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        test262: Various Constructors length properties should be configurable
     4        https://bugs.webkit.org/show_bug.cgi?id=161998
     5
     6        Reviewed by Saam Barati.
     7
     8        https://tc39.github.io/ecma262/#sec-ecmascript-standard-built-in-objects
     9        Unless otherwise specified, the length property of a built-in Function
     10        object has the attributes:
     11        { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
     12
     13        * runtime/ErrorConstructor.cpp:
     14        (JSC::ErrorConstructor::finishCreation):
     15        * runtime/JSPromiseConstructor.cpp:
     16        (JSC::JSPromiseConstructor::finishCreation):
     17        * runtime/MapConstructor.cpp:
     18        (JSC::MapConstructor::finishCreation):
     19        * runtime/NativeErrorConstructor.cpp:
     20        (JSC::NativeErrorConstructor::finishCreation):
     21        * runtime/ProxyConstructor.cpp:
     22        (JSC::ProxyConstructor::finishCreation):
     23        * runtime/SetConstructor.cpp:
     24        (JSC::SetConstructor::finishCreation):
     25        * runtime/WeakMapConstructor.cpp:
     26        (JSC::WeakMapConstructor::finishCreation):
     27        * runtime/WeakSetConstructor.cpp:
     28        (JSC::WeakSetConstructor::finishCreation):
     29
    1302016-09-16  Youenn Fablet  <youenn@apple.com>
    231
  • trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp

    r205569 r206018  
    4444    // ECMA 15.11.3.1 Error.prototype
    4545    putDirectWithoutTransition(vm, vm.propertyNames->prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);
    46     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontDelete | ReadOnly | DontEnum);
     46    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontEnum | ReadOnly);
    4747}
    4848
  • trunk/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp

    r205569 r206018  
    8383    Base::finishCreation(vm, ASCIILiteral("Promise"));
    8484    putDirectWithoutTransition(vm, vm.propertyNames->prototype, promisePrototype, DontEnum | DontDelete | ReadOnly);
    85     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     85    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontEnum | ReadOnly);
    8686    putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
    8787}
  • trunk/Source/JavaScriptCore/runtime/MapConstructor.cpp

    r205569 r206018  
    4444    Base::finishCreation(vm, mapPrototype->classInfo()->className);
    4545    putDirectWithoutTransition(vm, vm.propertyNames->prototype, mapPrototype, DontEnum | DontDelete | ReadOnly);
    46     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
     46    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontEnum | ReadOnly);
    4747    putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
    4848}
  • trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp

    r205569 r206018  
    4747    NativeErrorPrototype* prototype = NativeErrorPrototype::create(vm, prototypeStructure, name, this);
    4848   
    49     putDirect(vm, vm.propertyNames->length, jsNumber(1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5
     49    putDirect(vm, vm.propertyNames->length, jsNumber(1), DontEnum | ReadOnly);
    5050    putDirect(vm, vm.propertyNames->prototype, prototype, DontDelete | ReadOnly | DontEnum);
    5151    m_errorStructure.set(vm, this, ErrorInstance::createStructure(vm, globalObject, prototype));
  • trunk/Source/JavaScriptCore/runtime/ProxyConstructor.cpp

    r205569 r206018  
    9090    Base::finishCreation(vm, name);
    9191
    92     putDirect(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
     92    putDirect(vm, vm.propertyNames->length, jsNumber(2), DontEnum | ReadOnly);
    9393    putDirect(vm, makeIdentifier(vm, "revocable"), JSFunction::create(vm, globalObject, 2, ASCIILiteral("revocable"), makeRevocableProxy, NoIntrinsic, proxyRevocableConstructorThrowError));
    9494}
  • trunk/Source/JavaScriptCore/runtime/SetConstructor.cpp

    r205654 r206018  
    4444    Base::finishCreation(vm, setPrototype->classInfo()->className);
    4545    putDirectWithoutTransition(vm, vm.propertyNames->prototype, setPrototype, DontEnum | DontDelete | ReadOnly);
    46     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
     46    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontEnum | ReadOnly);
    4747    putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
    4848}
  • trunk/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp

    r205569 r206018  
    4343    Base::finishCreation(vm, prototype->classInfo()->className);
    4444    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    45     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
     45    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontEnum | ReadOnly);
    4646}
    4747
  • trunk/Source/JavaScriptCore/runtime/WeakSetConstructor.cpp

    r205569 r206018  
    4343    Base::finishCreation(vm, prototype->classInfo()->className);
    4444    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    45     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
     45    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontEnum | ReadOnly);
    4646}
    4747
Note: See TracChangeset for help on using the changeset viewer.