Title: [215234] trunk
Revision
215234
Author
[email protected]
Date
2017-04-11 09:38:43 -0700 (Tue, 11 Apr 2017)

Log Message

test262: test262/test/built-ins/Array/S15.4.3_A2.2.js
https://bugs.webkit.org/show_bug.cgi?id=170652

Patch by Joseph Pecoraro <[email protected]> on 2017-04-11
Reviewed by Michael Saboff.

JSTests:

* stress/native-constructors-length.js: Added.
(assertLengthDescriptorAttributes):
Add a quick test for the length properties of all native constructors.

* ChakraCore/test/es5/enumerable.baseline-jsc:
Rebaseline expectations for this test.

* test262.yaml:

Source/_javascript_Core:

* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::finishCreation):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::finishCreation):
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::finishCreation):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::finishCreation):
* runtime/JSArrayBufferConstructor.cpp:
(JSC::JSArrayBufferConstructor::finishCreation):
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::finishCreation):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::finishCreation):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::finishCreation):
* runtime/SymbolConstructor.cpp:
(JSC::SymbolConstructor::finishCreation):
Ensure the "length" property on these native constructors is configurable (deletable).

LayoutTests:

* ietestcenter/_javascript_/15.2.3.3-4-186-expected.txt:
* ietestcenter/_javascript_/15.2.3.3-4-191-expected.txt:
* ietestcenter/_javascript_/15.2.3.3-4-194-expected.txt:
* ietestcenter/_javascript_/15.2.3.3-4-201-expected.txt:
* ietestcenter/_javascript_/15.3.3.2-1-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.3/S15.4.3_A2.2-expected.txt:
* sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.1_Date.prototype.constructor/S15.9.5.1_A3_T2-expected.txt:
These tests expected the opposite, they are now out of date.

Modified Paths

Added Paths

Diff

Modified: trunk/JSTests/ChakraCore/test/es5/enumerable.baseline-jsc (215233 => 215234)


--- trunk/JSTests/ChakraCore/test/es5/enumerable.baseline-jsc	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/JSTests/ChakraCore/test/es5/enumerable.baseline-jsc	2017-04-11 16:38:43 UTC (rev 215234)
@@ -195,20 +195,20 @@
 value:2
 writable:false
 enumerable:false
-configurable:false
+configurable:true
 value:1
 writable:false
 enumerable:false
-configurable:false
+configurable:true
 value:1
 writable:false
 enumerable:false
-configurable:false
+configurable:true
 value:1
 writable:false
 enumerable:false
-configurable:false
+configurable:true
 value:1
 writable:false
 enumerable:false
-configurable:false
+configurable:true

Modified: trunk/JSTests/ChangeLog (215233 => 215234)


--- trunk/JSTests/ChangeLog	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/JSTests/ChangeLog	2017-04-11 16:38:43 UTC (rev 215234)
@@ -1,3 +1,19 @@
+2017-04-11  Joseph Pecoraro  <[email protected]>
+
+        test262: test262/test/built-ins/Array/S15.4.3_A2.2.js
+        https://bugs.webkit.org/show_bug.cgi?id=170652
+
+        Reviewed by Michael Saboff.
+
+        * stress/native-constructors-length.js: Added.
+        (assertLengthDescriptorAttributes):
+        Add a quick test for the length properties of all native constructors.
+
+        * ChakraCore/test/es5/enumerable.baseline-jsc:
+        Rebaseline expectations for this test.
+
+        * test262.yaml:
+
 2017-04-10  Keith Miller  <[email protected]>
 
         WebAssembly: Update spec tests

Added: trunk/JSTests/stress/native-constructors-length.js (0 => 215234)


--- trunk/JSTests/stress/native-constructors-length.js	                        (rev 0)
+++ trunk/JSTests/stress/native-constructors-length.js	2017-04-11 16:38:43 UTC (rev 215234)
@@ -0,0 +1,41 @@
+function assert(b) {
+    if (!b)
+        throw new Error("Bad assertion");
+}
+
+function assertLengthDescriptorAttributes(ctor, lengthValue) {
+    let descriptor = Object.getOwnPropertyDescriptor(ctor, "length");
+
+    assert(descriptor.value === lengthValue);
+    assert(!descriptor.enumerable);
+    assert(!descriptor.writable);
+    assert(descriptor.configurable);
+}
+
+assertLengthDescriptorAttributes(Array, 1);
+assertLengthDescriptorAttributes(ArrayBuffer, 1);
+assertLengthDescriptorAttributes(Boolean, 1);
+assertLengthDescriptorAttributes(DataView, 3);
+assertLengthDescriptorAttributes(Date, 7);
+assertLengthDescriptorAttributes(Error, 1);
+assertLengthDescriptorAttributes(Function, 1);
+assertLengthDescriptorAttributes(Map, 0);
+assertLengthDescriptorAttributes(Number, 1);
+assertLengthDescriptorAttributes(Object, 1);
+assertLengthDescriptorAttributes(Promise, 1);
+assertLengthDescriptorAttributes(Proxy, 2);
+assertLengthDescriptorAttributes(RegExp, 2);
+assertLengthDescriptorAttributes(Set, 0);
+assertLengthDescriptorAttributes(String, 1);
+assertLengthDescriptorAttributes(Symbol, 0);
+assertLengthDescriptorAttributes(WeakMap, 0);
+assertLengthDescriptorAttributes(WeakSet, 0);
+
+assertLengthDescriptorAttributes(Int8Array, 3);
+assertLengthDescriptorAttributes(Uint8Array, 3);
+assertLengthDescriptorAttributes(Int16Array, 3);
+assertLengthDescriptorAttributes(Uint16Array, 3);
+assertLengthDescriptorAttributes(Int32Array, 3);
+assertLengthDescriptorAttributes(Uint32Array, 3);
+assertLengthDescriptorAttributes(Float32Array, 3);
+assertLengthDescriptorAttributes(Float64Array, 3);

Modified: trunk/JSTests/test262.yaml (215233 => 215234)


--- trunk/JSTests/test262.yaml	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/JSTests/test262.yaml	2017-04-11 16:38:43 UTC (rev 215234)
@@ -2570,9 +2570,9 @@
 - path: test262/test/built-ins/Array/S15.4.3_A2.1.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Array/S15.4.3_A2.2.js
-  cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], []
 - path: test262/test/built-ins/Array/S15.4.3_A2.2.js
-  cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Array/S15.4.3_A2.3.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/Array/S15.4.3_A2.3.js
@@ -15494,9 +15494,9 @@
 - path: test262/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T1.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T2.js
-  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T2.js
-  cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T3.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Date/prototype/constructor/S15.9.5.1_A3_T3.js
@@ -17528,9 +17528,9 @@
 - path: test262/test/built-ins/Function/instance-name.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/Function/length/15.3.3.2-1.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Function/length/15.3.3.2-1.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Function/length/S15.3.5.1_A1_T1.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Function/length/S15.3.5.1_A1_T1.js
@@ -31870,9 +31870,9 @@
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-185.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-186.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-186.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-187.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-187.js
@@ -31894,9 +31894,9 @@
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-190.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-191.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-191.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-192.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-192.js
@@ -31906,9 +31906,9 @@
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-193.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-194.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-194.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-195.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-195.js
@@ -31942,9 +31942,9 @@
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-200.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-201.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-201.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-202.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Object/getOwnPropertyDescriptor/15.2.3.3-4-202.js
@@ -60794,7 +60794,7 @@
 - path: test262/test/language/expressions/delete/11.4.1-5-a-28-s.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], []
 - path: test262/test/language/expressions/delete/11.4.1-5-a-28-s.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/language/expressions/delete/11.4.1-5-a-3-s.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/language/expressions/delete/11.4.1-5-a-4-s.js

Modified: trunk/LayoutTests/ChangeLog (215233 => 215234)


--- trunk/LayoutTests/ChangeLog	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/LayoutTests/ChangeLog	2017-04-11 16:38:43 UTC (rev 215234)
@@ -1,3 +1,19 @@
+2017-04-11  Joseph Pecoraro  <[email protected]>
+
+        test262: test262/test/built-ins/Array/S15.4.3_A2.2.js
+        https://bugs.webkit.org/show_bug.cgi?id=170652
+
+        Reviewed by Michael Saboff.
+
+        * ietestcenter/_javascript_/15.2.3.3-4-186-expected.txt:
+        * ietestcenter/_javascript_/15.2.3.3-4-191-expected.txt:
+        * ietestcenter/_javascript_/15.2.3.3-4-194-expected.txt:
+        * ietestcenter/_javascript_/15.2.3.3-4-201-expected.txt:
+        * ietestcenter/_javascript_/15.3.3.2-1-expected.txt:
+        * sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.3/S15.4.3_A2.2-expected.txt:
+        * sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.1_Date.prototype.constructor/S15.9.5.1_A3_T2-expected.txt:
+        These tests expected the opposite, they are now out of date.
+
 2017-04-11  Yoav Weiss  <[email protected]>
 
         [link preload] Double downloads of preloaded content when it's in MemoryCache

Modified: trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.3-4-186-expected.txt (215233 => 215234)


--- trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.3-4-186-expected.txt	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.3-4-186-expected.txt	2017-04-11 16:38:43 UTC (rev 215234)
@@ -4,7 +4,7 @@
 
 
 PASS ES5Harness.preconditionPassed is true
-PASS ES5Harness.testPassed is true
+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.3-4-191-expected.txt (215233 => 215234)


--- trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.3-4-191-expected.txt	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.3-4-191-expected.txt	2017-04-11 16:38:43 UTC (rev 215234)
@@ -4,7 +4,7 @@
 
 
 PASS ES5Harness.preconditionPassed is true
-PASS ES5Harness.testPassed is true
+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.3-4-194-expected.txt (215233 => 215234)


--- trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.3-4-194-expected.txt	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.3-4-194-expected.txt	2017-04-11 16:38:43 UTC (rev 215234)
@@ -4,7 +4,7 @@
 
 
 PASS ES5Harness.preconditionPassed is true
-PASS ES5Harness.testPassed is true
+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.3-4-201-expected.txt (215233 => 215234)


--- trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.3-4-201-expected.txt	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/LayoutTests/ietestcenter/_javascript_/15.2.3.3-4-201-expected.txt	2017-04-11 16:38:43 UTC (rev 215234)
@@ -4,7 +4,7 @@
 
 
 PASS ES5Harness.preconditionPassed is true
-PASS ES5Harness.testPassed is true
+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/ietestcenter/_javascript_/15.3.3.2-1-expected.txt (215233 => 215234)


--- trunk/LayoutTests/ietestcenter/_javascript_/15.3.3.2-1-expected.txt	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/LayoutTests/ietestcenter/_javascript_/15.3.3.2-1-expected.txt	2017-04-11 16:38:43 UTC (rev 215234)
@@ -4,7 +4,7 @@
 
 
 PASS ES5Harness.preconditionPassed is true
-PASS ES5Harness.testPassed is true
+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.3/S15.4.3_A2.2-expected.txt (215233 => 215234)


--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.3/S15.4.3_A2.2-expected.txt	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.3/S15.4.3_A2.2-expected.txt	2017-04-11 16:38:43 UTC (rev 215234)
@@ -1,6 +1,6 @@
 S15.4.3_A2.2
 
-PASS 
+FAIL SputnikError: #2: delete Array.length; Array.hasOwnProperty('length') === true. Actual: false
 
 TEST COMPLETE
 

Modified: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.1_Date.prototype.constructor/S15.9.5.1_A3_T2-expected.txt (215233 => 215234)


--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.1_Date.prototype.constructor/S15.9.5.1_A3_T2-expected.txt	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.9_Date/15.9.5/15.9.5.1_Date.prototype.constructor/S15.9.5.1_A3_T2-expected.txt	2017-04-11 16:38:43 UTC (rev 215234)
@@ -1,6 +1,6 @@
 S15.9.5.1_A3_T2
 
-PASS 
+FAIL SputnikError: #1: The Date.prototype.constructor.length property has the attributes DontDelete
 
 TEST COMPLETE
 

Modified: trunk/Source/_javascript_Core/ChangeLog (215233 => 215234)


--- trunk/Source/_javascript_Core/ChangeLog	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-04-11 16:38:43 UTC (rev 215234)
@@ -1,3 +1,32 @@
+2017-04-11  Joseph Pecoraro  <[email protected]>
+
+        test262: test262/test/built-ins/Array/S15.4.3_A2.2.js
+        https://bugs.webkit.org/show_bug.cgi?id=170652
+
+        Reviewed by Michael Saboff.
+
+        * runtime/ArrayConstructor.cpp:
+        (JSC::ArrayConstructor::finishCreation):
+        * runtime/BooleanConstructor.cpp:
+        (JSC::BooleanConstructor::finishCreation):
+        * runtime/DateConstructor.cpp:
+        (JSC::DateConstructor::finishCreation):
+        * runtime/FunctionConstructor.cpp:
+        (JSC::FunctionConstructor::finishCreation):
+        * runtime/JSArrayBufferConstructor.cpp:
+        (JSC::JSArrayBufferConstructor::finishCreation):
+        * runtime/NumberConstructor.cpp:
+        (JSC::NumberConstructor::finishCreation):
+        * runtime/ObjectConstructor.cpp:
+        (JSC::ObjectConstructor::finishCreation):
+        * runtime/RegExpConstructor.cpp:
+        (JSC::RegExpConstructor::finishCreation):
+        * runtime/StringConstructor.cpp:
+        (JSC::StringConstructor::finishCreation):
+        * runtime/SymbolConstructor.cpp:
+        (JSC::SymbolConstructor::finishCreation):
+        Ensure the "length" property on these native constructors is configurable (deletable).
+
 2017-04-11  Yusuke Suzuki  <[email protected]>
 
         Unreviewed, build fix for Windows after r215228 part 2

Modified: trunk/Source/_javascript_Core/runtime/ArrayConstructor.cpp (215233 => 215234)


--- trunk/Source/_javascript_Core/runtime/ArrayConstructor.cpp	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/runtime/ArrayConstructor.cpp	2017-04-11 16:38:43 UTC (rev 215234)
@@ -59,7 +59,7 @@
 {
     Base::finishCreation(vm, arrayPrototype->classInfo(vm)->className);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, arrayPrototype, DontEnum | DontDelete | ReadOnly);
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->isArray, arrayConstructorIsArrayCodeGenerator, DontEnum);
 }

Modified: trunk/Source/_javascript_Core/runtime/AsyncFunctionConstructor.cpp (215233 => 215234)


--- trunk/Source/_javascript_Core/runtime/AsyncFunctionConstructor.cpp	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/runtime/AsyncFunctionConstructor.cpp	2017-04-11 16:38:43 UTC (rev 215234)
@@ -45,8 +45,6 @@
 {
     Base::finishCreation(vm, "AsyncFunction");
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
-
-    // Number of arguments for constructor
     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 }
 

Modified: trunk/Source/_javascript_Core/runtime/BooleanConstructor.cpp (215233 => 215234)


--- trunk/Source/_javascript_Core/runtime/BooleanConstructor.cpp	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/runtime/BooleanConstructor.cpp	2017-04-11 16:38:43 UTC (rev 215234)
@@ -40,9 +40,7 @@
 {
     Base::finishCreation(vm, booleanPrototype->classInfo()->className);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);
-
-    // no. of arguments for constructor
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 }
 
 // ECMA 15.6.2

Modified: trunk/Source/_javascript_Core/runtime/DateConstructor.cpp (215233 => 215234)


--- trunk/Source/_javascript_Core/runtime/DateConstructor.cpp	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/runtime/DateConstructor.cpp	2017-04-11 16:38:43 UTC (rev 215234)
@@ -104,7 +104,7 @@
 {
     Base::finishCreation(vm, "Date");
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, datePrototype, DontEnum | DontDelete | ReadOnly);
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(7), ReadOnly | DontEnum | DontDelete);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(7), ReadOnly | DontEnum);
 }
 
 static double millisecondsFromComponents(ExecState* exec, const ArgList& args, WTF::TimeType timeType)

Modified: trunk/Source/_javascript_Core/runtime/FunctionConstructor.cpp (215233 => 215234)


--- trunk/Source/_javascript_Core/runtime/FunctionConstructor.cpp	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/runtime/FunctionConstructor.cpp	2017-04-11 16:38:43 UTC (rev 215234)
@@ -45,9 +45,7 @@
 {
     Base::finishCreation(vm, functionPrototype->classInfo()->className);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, functionPrototype, DontEnum | DontDelete | ReadOnly);
-
-    // Number of arguments for constructor
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 }
 
 static EncodedJSValue JSC_HOST_CALL constructWithFunctionConstructor(ExecState* exec)

Modified: trunk/Source/_javascript_Core/runtime/GeneratorFunctionConstructor.cpp (215233 => 215234)


--- trunk/Source/_javascript_Core/runtime/GeneratorFunctionConstructor.cpp	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/runtime/GeneratorFunctionConstructor.cpp	2017-04-11 16:38:43 UTC (rev 215234)
@@ -45,8 +45,6 @@
 {
     Base::finishCreation(vm, "GeneratorFunction");
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, generatorFunctionPrototype, DontEnum | DontDelete | ReadOnly);
-
-    // Number of arguments for constructor
     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 }
 

Modified: trunk/Source/_javascript_Core/runtime/JSArrayBufferConstructor.cpp (215233 => 215234)


--- trunk/Source/_javascript_Core/runtime/JSArrayBufferConstructor.cpp	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/runtime/JSArrayBufferConstructor.cpp	2017-04-11 16:38:43 UTC (rev 215234)
@@ -54,7 +54,7 @@
 {
     Base::finishCreation(vm, ASCIILiteral(arrayBufferSharingModeName(m_sharingMode)));
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontEnum | DontDelete | ReadOnly);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontEnum | ReadOnly);
     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
 
     if (m_sharingMode == ArrayBufferSharingMode::Default) {

Modified: trunk/Source/_javascript_Core/runtime/NumberConstructor.cpp (215233 => 215234)


--- trunk/Source/_javascript_Core/runtime/NumberConstructor.cpp	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/runtime/NumberConstructor.cpp	2017-04-11 16:38:43 UTC (rev 215234)
@@ -64,12 +64,9 @@
     Base::finishCreation(vm, NumberPrototype::info()->className);
     ASSERT(inherits(vm, info()));
 
-    // Number.Prototype
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, numberPrototype, DontEnum | DontDelete | ReadOnly);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 
-    // no. of arguments for constructor
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
-
     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "EPSILON"), jsDoubleNumber(std::numeric_limits<double>::epsilon()), DontDelete | DontEnum | ReadOnly);
     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "MAX_VALUE"), jsDoubleNumber(1.7976931348623157E+308), DontDelete | DontEnum | ReadOnly);
     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "MIN_VALUE"), jsDoubleNumber(5E-324), DontDelete | DontEnum | ReadOnly);

Modified: trunk/Source/_javascript_Core/runtime/ObjectConstructor.cpp (215233 => 215234)


--- trunk/Source/_javascript_Core/runtime/ObjectConstructor.cpp	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/runtime/ObjectConstructor.cpp	2017-04-11 16:38:43 UTC (rev 215234)
@@ -96,10 +96,9 @@
 void ObjectConstructor::finishCreation(VM& vm, JSGlobalObject* globalObject, ObjectPrototype* objectPrototype)
 {
     Base::finishCreation(vm, objectPrototype->classInfo(vm)->className);
-    // ECMA 15.2.3.1
+
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, objectPrototype, DontEnum | DontDelete | ReadOnly);
-    // no. of arguments for constructor
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().createPrivateName(), objectConstructorCreate, DontEnum, 2);
     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().definePropertyPrivateName(), objectConstructorDefineProperty, DontEnum, 3);

Modified: trunk/Source/_javascript_Core/runtime/RegExpConstructor.cpp (215233 => 215234)


--- trunk/Source/_javascript_Core/runtime/RegExpConstructor.cpp	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/runtime/RegExpConstructor.cpp	2017-04-11 16:38:43 UTC (rev 215234)
@@ -89,10 +89,8 @@
     ASSERT(inherits(vm, info()));
 
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, regExpPrototype, DontEnum | DontDelete | ReadOnly);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontEnum);
 
-    // no. of arguments for constructor
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
-
     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
 }
 

Modified: trunk/Source/_javascript_Core/runtime/StringConstructor.cpp (215233 => 215234)


--- trunk/Source/_javascript_Core/runtime/StringConstructor.cpp	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/runtime/StringConstructor.cpp	2017-04-11 16:38:43 UTC (rev 215234)
@@ -61,7 +61,7 @@
 {
     Base::finishCreation(vm, stringPrototype->classInfo()->className);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, stringPrototype, ReadOnly | DontEnum | DontDelete);
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
 }
 
 // ------------------------------ Functions --------------------------------

Modified: trunk/Source/_javascript_Core/runtime/SymbolConstructor.cpp (215233 => 215234)


--- trunk/Source/_javascript_Core/runtime/SymbolConstructor.cpp	2017-04-11 16:26:21 UTC (rev 215233)
+++ trunk/Source/_javascript_Core/runtime/SymbolConstructor.cpp	2017-04-11 16:38:43 UTC (rev 215234)
@@ -68,7 +68,7 @@
 {
     Base::finishCreation(vm, prototype->classInfo(vm)->className);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
 
     JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_WELL_KNOWN_SYMBOL(INITIALIZE_WELL_KNOWN_SYMBOLS)
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to