Title: [205932] trunk
Revision
205932
Author
[email protected]
Date
2016-09-14 15:27:19 -0700 (Wed, 14 Sep 2016)

Log Message

test262: TypedArray constructors length should be 3 and configurable
https://bugs.webkit.org/show_bug.cgi?id=161955

Patch by Joseph Pecoraro <[email protected]> on 2016-09-14
Reviewed by Mark Lam.

JSTests:

* test262.yaml:

Source/_javascript_Core:

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/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):

LayoutTests:

* js/script-tests/typedarray-constructors.js:
* js/typedarray-constructors-expected.txt:
* js/dom/constructor-length.html:
* platform/efl/js/dom/constructor-length-expected.txt:
* platform/gtk/js/dom/constructor-length-expected.txt:
* platform/ios-simulator/js/dom/constructor-length-expected.txt:
* platform/mac/js/dom/constructor-length-expected.txt:
* platform/win/js/dom/constructor-length-expected.txt:

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (205931 => 205932)


--- trunk/JSTests/ChangeLog	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/JSTests/ChangeLog	2016-09-14 22:27:19 UTC (rev 205932)
@@ -1,3 +1,12 @@
+2016-09-14  Joseph Pecoraro  <[email protected]>
+
+        test262: TypedArray constructors length should be 3 and configurable
+        https://bugs.webkit.org/show_bug.cgi?id=161955
+
+        Reviewed by Mark Lam.
+
+        * test262.yaml:
+
 2016-09-14  Benjamin Poulain  <[email protected]>
 
         [JSC] Make the rounding-related nodes support any type

Modified: trunk/JSTests/test262.yaml (205931 => 205932)


--- trunk/JSTests/test262.yaml	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/JSTests/test262.yaml	2016-09-14 22:27:19 UTC (rev 205932)
@@ -13570,9 +13570,9 @@
 - path: test262/test/built-ins/DataView/instance-extensibility.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/DataView/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/DataView/name.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/DataView/name.js
@@ -47930,9 +47930,9 @@
 - path: test262/test/built-ins/TypedArrays/Float32Array/constructor.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Float32Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Float32Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Float32Array/name.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Float32Array/name.js
@@ -47970,9 +47970,9 @@
 - path: test262/test/built-ins/TypedArrays/Float64Array/constructor.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Float64Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Float64Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Float64Array/name.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Float64Array/name.js
@@ -48010,9 +48010,9 @@
 - path: test262/test/built-ins/TypedArrays/Int16Array/constructor.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Int16Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Int16Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Int16Array/name.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Int16Array/name.js
@@ -48050,9 +48050,9 @@
 - path: test262/test/built-ins/TypedArrays/Int32Array/constructor.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Int32Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Int32Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Int32Array/name.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Int32Array/name.js
@@ -48090,9 +48090,9 @@
 - path: test262/test/built-ins/TypedArrays/Int8Array/constructor.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Int8Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Int8Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Int8Array/name.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Int8Array/name.js
@@ -48130,9 +48130,9 @@
 - path: test262/test/built-ins/TypedArrays/Uint16Array/constructor.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Uint16Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Uint16Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Uint16Array/name.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Uint16Array/name.js
@@ -48170,9 +48170,9 @@
 - path: test262/test/built-ins/TypedArrays/Uint32Array/constructor.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Uint32Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Uint32Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Uint32Array/name.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Uint32Array/name.js
@@ -48210,9 +48210,9 @@
 - path: test262/test/built-ins/TypedArrays/Uint8Array/constructor.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Uint8Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Uint8Array/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Uint8Array/name.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Uint8Array/name.js
@@ -48250,9 +48250,9 @@
 - path: test262/test/built-ins/TypedArrays/Uint8ClampedArray/constructor.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Uint8ClampedArray/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Uint8ClampedArray/length.js
-  cmd: runTest262 :fail, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
+  cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/TypedArrays/Uint8ClampedArray/name.js
   cmd: runTest262 :normal, "NoException", ["../../../../harness/assert.js", "../../../../harness/sta.js", "../../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/TypedArrays/Uint8ClampedArray/name.js

Modified: trunk/LayoutTests/ChangeLog (205931 => 205932)


--- trunk/LayoutTests/ChangeLog	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/LayoutTests/ChangeLog	2016-09-14 22:27:19 UTC (rev 205932)
@@ -1,3 +1,19 @@
+2016-09-14  Joseph Pecoraro  <[email protected]>
+
+        test262: TypedArray constructors length should be 3 and configurable
+        https://bugs.webkit.org/show_bug.cgi?id=161955
+
+        Reviewed by Mark Lam.
+
+        * js/script-tests/typedarray-constructors.js:
+        * js/typedarray-constructors-expected.txt:
+        * js/dom/constructor-length.html:
+        * platform/efl/js/dom/constructor-length-expected.txt:
+        * platform/gtk/js/dom/constructor-length-expected.txt:
+        * platform/ios-simulator/js/dom/constructor-length-expected.txt:
+        * platform/mac/js/dom/constructor-length-expected.txt:
+        * platform/win/js/dom/constructor-length-expected.txt:
+
 2016-09-14  Chris Dumez  <[email protected]>
 
         input.type cannot be set to "file" after being set to another type

Modified: trunk/LayoutTests/js/dom/constructor-length.html (205931 => 205932)


--- trunk/LayoutTests/js/dom/constructor-length.html	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/LayoutTests/js/dom/constructor-length.html	2016-09-14 22:27:19 UTC (rev 205932)
@@ -17,18 +17,18 @@
 shouldBe('CustomEvent.length', '1');
 shouldBe('DOMFormData.length', '0');
 shouldBe('DOMParser.length', '0');
-shouldBe('DataView.length', '0');
+shouldBe('DataView.length', '3');
 shouldBe('ErrorEvent.length', '1');
 shouldBe('Event.length', '1');
 shouldBe('EventSource.length', '1');
-shouldBe('Float32Array.length', '0');
-shouldBe('Float64Array.length', '0');
+shouldBe('Float32Array.length', '3');
+shouldBe('Float64Array.length', '3');
 shouldBe('FileReader.length', '0');
 shouldBe('FileReaderSync.length', '0');
 shouldBe('HashChangeEvent.length', '1');
-shouldBe('Int16Array.length', '0');
-shouldBe('Int32Array.length', '0');
-shouldBe('Int8Array.length', '0');
+shouldBe('Int16Array.length', '3');
+shouldBe('Int32Array.length', '3');
+shouldBe('Int8Array.length', '3');
 shouldBe('Intent.length', '3');
 shouldBe('MediaController.length', '0');
 shouldBe('MediaStream.length', '0');
@@ -43,10 +43,10 @@
 shouldBe('StorageEvent.length', '1');
 shouldBe('TextTrackCue.length', '0');
 shouldBe('TrackEvent.length', '1');
-shouldBe('Uint16Array.length', '0');
-shouldBe('Uint32Array.length', '0');
-shouldBe('Uint8Array.length', '0');
-shouldBe('Uint8ClampedArray.length', '0');
+shouldBe('Uint16Array.length', '3');
+shouldBe('Uint32Array.length', '3');
+shouldBe('Uint8Array.length', '3');
+shouldBe('Uint8ClampedArray.length', '3');
 shouldBe('VTTCue.length', '3');
 shouldBe('WebGLContextEvent.length', '1');
 shouldBe('WebKitAnimationEvent.length', '1');

Modified: trunk/LayoutTests/js/script-tests/typedarray-constructors.js (205931 => 205932)


--- trunk/LayoutTests/js/script-tests/typedarray-constructors.js	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/LayoutTests/js/script-tests/typedarray-constructors.js	2016-09-14 22:27:19 UTC (rev 205932)
@@ -19,9 +19,9 @@
 for (let arrayType of arrayTypes) {
     shouldThrow("" + arrayType.name + "()");
     shouldNotThrow("new " + arrayType.name + "()");
-    shouldBe("" + arrayType.name + ".length", "0");
+    shouldBe("" + arrayType.name + ".length", "3");
 }
 
 shouldThrow("DataView(new ArrayBuffer())");
 shouldNotThrow("new DataView(new ArrayBuffer())");
-shouldBe("DataView.length", "0");
+shouldBe("DataView.length", "3");

Modified: trunk/LayoutTests/js/typedarray-constructors-expected.txt (205931 => 205932)


--- trunk/LayoutTests/js/typedarray-constructors-expected.txt	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/LayoutTests/js/typedarray-constructors-expected.txt	2016-09-14 22:27:19 UTC (rev 205932)
@@ -5,34 +5,34 @@
 
 PASS Int8Array() threw exception TypeError: calling Int8Array constructor without new is invalid.
 PASS new Int8Array() did not throw exception.
-PASS Int8Array.length is 0
+PASS Int8Array.length is 3
 PASS Int16Array() threw exception TypeError: calling Int16Array constructor without new is invalid.
 PASS new Int16Array() did not throw exception.
-PASS Int16Array.length is 0
+PASS Int16Array.length is 3
 PASS Int32Array() threw exception TypeError: calling Int32Array constructor without new is invalid.
 PASS new Int32Array() did not throw exception.
-PASS Int32Array.length is 0
+PASS Int32Array.length is 3
 PASS Uint8Array() threw exception TypeError: calling Uint8Array constructor without new is invalid.
 PASS new Uint8Array() did not throw exception.
-PASS Uint8Array.length is 0
+PASS Uint8Array.length is 3
 PASS Uint8ClampedArray() threw exception TypeError: calling Uint8ClampedArray constructor without new is invalid.
 PASS new Uint8ClampedArray() did not throw exception.
-PASS Uint8ClampedArray.length is 0
+PASS Uint8ClampedArray.length is 3
 PASS Uint16Array() threw exception TypeError: calling Uint16Array constructor without new is invalid.
 PASS new Uint16Array() did not throw exception.
-PASS Uint16Array.length is 0
+PASS Uint16Array.length is 3
 PASS Uint32Array() threw exception TypeError: calling Uint32Array constructor without new is invalid.
 PASS new Uint32Array() did not throw exception.
-PASS Uint32Array.length is 0
+PASS Uint32Array.length is 3
 PASS Float32Array() threw exception TypeError: calling Float32Array constructor without new is invalid.
 PASS new Float32Array() did not throw exception.
-PASS Float32Array.length is 0
+PASS Float32Array.length is 3
 PASS Float64Array() threw exception TypeError: calling Float64Array constructor without new is invalid.
 PASS new Float64Array() did not throw exception.
-PASS Float64Array.length is 0
+PASS Float64Array.length is 3
 PASS DataView(new ArrayBuffer()) threw exception TypeError: calling DataView constructor without new is invalid.
 PASS new DataView(new ArrayBuffer()) did not throw exception.
-PASS DataView.length is 0
+PASS DataView.length is 3
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/platform/efl/js/dom/constructor-length-expected.txt (205931 => 205932)


--- trunk/LayoutTests/platform/efl/js/dom/constructor-length-expected.txt	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/LayoutTests/platform/efl/js/dom/constructor-length-expected.txt	2016-09-14 22:27:19 UTC (rev 205932)
@@ -13,18 +13,18 @@
 PASS CustomEvent.length is 1
 FAIL DOMFormData.length should be 0. Threw exception ReferenceError: Can't find variable: DOMFormData
 PASS DOMParser.length is 0
-PASS DataView.length is 0
+PASS DataView.length is 3
 PASS ErrorEvent.length is 1
 PASS Event.length is 1
 PASS EventSource.length is 1
-PASS Float32Array.length is 0
-PASS Float64Array.length is 0
+PASS Float32Array.length is 3
+PASS Float64Array.length is 3
 PASS FileReader.length is 0
 FAIL FileReaderSync.length should be 0. Threw exception ReferenceError: Can't find variable: FileReaderSync
 PASS HashChangeEvent.length is 1
-PASS Int16Array.length is 0
-PASS Int32Array.length is 0
-PASS Int8Array.length is 0
+PASS Int16Array.length is 3
+PASS Int32Array.length is 3
+PASS Int8Array.length is 3
 FAIL Intent.length should be 3. Threw exception ReferenceError: Can't find variable: Intent
 PASS MediaController.length is 0
 PASS MediaStream.length is 0
@@ -39,10 +39,10 @@
 PASS StorageEvent.length is 1
 PASS TextTrackCue.length is 0
 PASS TrackEvent.length is 1
-PASS Uint16Array.length is 0
-PASS Uint32Array.length is 0
-PASS Uint8Array.length is 0
-PASS Uint8ClampedArray.length is 0
+PASS Uint16Array.length is 3
+PASS Uint32Array.length is 3
+PASS Uint8Array.length is 3
+PASS Uint8ClampedArray.length is 3
 PASS VTTCue.length is 3
 PASS WebGLContextEvent.length is 1
 PASS WebKitAnimationEvent.length is 1

Modified: trunk/LayoutTests/platform/gtk/js/dom/constructor-length-expected.txt (205931 => 205932)


--- trunk/LayoutTests/platform/gtk/js/dom/constructor-length-expected.txt	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/LayoutTests/platform/gtk/js/dom/constructor-length-expected.txt	2016-09-14 22:27:19 UTC (rev 205932)
@@ -13,18 +13,18 @@
 PASS CustomEvent.length is 1
 FAIL DOMFormData.length should be 0. Threw exception ReferenceError: Can't find variable: DOMFormData
 PASS DOMParser.length is 0
-PASS DataView.length is 0
+PASS DataView.length is 3
 PASS ErrorEvent.length is 1
 PASS Event.length is 1
 PASS EventSource.length is 1
-PASS Float32Array.length is 0
-PASS Float64Array.length is 0
+PASS Float32Array.length is 3
+PASS Float64Array.length is 3
 PASS FileReader.length is 0
 FAIL FileReaderSync.length should be 0. Threw exception ReferenceError: Can't find variable: FileReaderSync
 PASS HashChangeEvent.length is 1
-PASS Int16Array.length is 0
-PASS Int32Array.length is 0
-PASS Int8Array.length is 0
+PASS Int16Array.length is 3
+PASS Int32Array.length is 3
+PASS Int8Array.length is 3
 FAIL Intent.length should be 3. Threw exception ReferenceError: Can't find variable: Intent
 PASS MediaController.length is 0
 FAIL MediaStream.length should be 0. Threw exception ReferenceError: Can't find variable: MediaStream
@@ -39,10 +39,10 @@
 PASS StorageEvent.length is 1
 PASS TextTrackCue.length is 0
 PASS TrackEvent.length is 1
-PASS Uint16Array.length is 0
-PASS Uint32Array.length is 0
-PASS Uint8Array.length is 0
-PASS Uint8ClampedArray.length is 0
+PASS Uint16Array.length is 3
+PASS Uint32Array.length is 3
+PASS Uint8Array.length is 3
+PASS Uint8ClampedArray.length is 3
 PASS VTTCue.length is 3
 PASS WebGLContextEvent.length is 1
 PASS WebKitAnimationEvent.length is 1

Modified: trunk/LayoutTests/platform/ios-simulator/js/dom/constructor-length-expected.txt (205931 => 205932)


--- trunk/LayoutTests/platform/ios-simulator/js/dom/constructor-length-expected.txt	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/LayoutTests/platform/ios-simulator/js/dom/constructor-length-expected.txt	2016-09-14 22:27:19 UTC (rev 205932)
@@ -13,18 +13,18 @@
 PASS CustomEvent.length is 1
 FAIL DOMFormData.length should be 0. Threw exception ReferenceError: Can't find variable: DOMFormData
 PASS DOMParser.length is 0
-PASS DataView.length is 0
+PASS DataView.length is 3
 PASS ErrorEvent.length is 1
 PASS Event.length is 1
 PASS EventSource.length is 1
-PASS Float32Array.length is 0
-PASS Float64Array.length is 0
+PASS Float32Array.length is 3
+PASS Float64Array.length is 3
 PASS FileReader.length is 0
 FAIL FileReaderSync.length should be 0. Threw exception ReferenceError: Can't find variable: FileReaderSync
 PASS HashChangeEvent.length is 1
-PASS Int16Array.length is 0
-PASS Int32Array.length is 0
-PASS Int8Array.length is 0
+PASS Int16Array.length is 3
+PASS Int32Array.length is 3
+PASS Int8Array.length is 3
 FAIL Intent.length should be 3. Threw exception ReferenceError: Can't find variable: Intent
 PASS MediaController.length is 0
 PASS MediaStream.length is 0
@@ -39,10 +39,10 @@
 PASS StorageEvent.length is 1
 PASS TextTrackCue.length is 0
 PASS TrackEvent.length is 1
-PASS Uint16Array.length is 0
-PASS Uint32Array.length is 0
-PASS Uint8Array.length is 0
-PASS Uint8ClampedArray.length is 0
+PASS Uint16Array.length is 3
+PASS Uint32Array.length is 3
+PASS Uint8Array.length is 3
+PASS Uint8ClampedArray.length is 3
 PASS VTTCue.length is 3
 PASS WebGLContextEvent.length is 1
 PASS WebKitAnimationEvent.length is 1

Modified: trunk/LayoutTests/platform/mac/js/dom/constructor-length-expected.txt (205931 => 205932)


--- trunk/LayoutTests/platform/mac/js/dom/constructor-length-expected.txt	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/LayoutTests/platform/mac/js/dom/constructor-length-expected.txt	2016-09-14 22:27:19 UTC (rev 205932)
@@ -13,18 +13,18 @@
 PASS CustomEvent.length is 1
 FAIL DOMFormData.length should be 0. Threw exception ReferenceError: Can't find variable: DOMFormData
 PASS DOMParser.length is 0
-PASS DataView.length is 0
+PASS DataView.length is 3
 PASS ErrorEvent.length is 1
 PASS Event.length is 1
 PASS EventSource.length is 1
-PASS Float32Array.length is 0
-PASS Float64Array.length is 0
+PASS Float32Array.length is 3
+PASS Float64Array.length is 3
 PASS FileReader.length is 0
 FAIL FileReaderSync.length should be 0. Threw exception ReferenceError: Can't find variable: FileReaderSync
 PASS HashChangeEvent.length is 1
-PASS Int16Array.length is 0
-PASS Int32Array.length is 0
-PASS Int8Array.length is 0
+PASS Int16Array.length is 3
+PASS Int32Array.length is 3
+PASS Int8Array.length is 3
 FAIL Intent.length should be 3. Threw exception ReferenceError: Can't find variable: Intent
 PASS MediaController.length is 0
 PASS MediaStream.length is 0
@@ -39,10 +39,10 @@
 PASS StorageEvent.length is 1
 PASS TextTrackCue.length is 0
 PASS TrackEvent.length is 1
-PASS Uint16Array.length is 0
-PASS Uint32Array.length is 0
-PASS Uint8Array.length is 0
-PASS Uint8ClampedArray.length is 0
+PASS Uint16Array.length is 3
+PASS Uint32Array.length is 3
+PASS Uint8Array.length is 3
+PASS Uint8ClampedArray.length is 3
 PASS VTTCue.length is 3
 PASS WebGLContextEvent.length is 1
 PASS WebKitAnimationEvent.length is 1

Modified: trunk/LayoutTests/platform/win/js/dom/constructor-length-expected.txt (205931 => 205932)


--- trunk/LayoutTests/platform/win/js/dom/constructor-length-expected.txt	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/LayoutTests/platform/win/js/dom/constructor-length-expected.txt	2016-09-14 22:27:19 UTC (rev 205932)
@@ -13,18 +13,18 @@
 PASS CustomEvent.length is 1
 FAIL DOMFormData.length should be 0. Threw exception ReferenceError: Can't find variable: DOMFormData
 PASS DOMParser.length is 0
-PASS DataView.length is 0
+PASS DataView.length is 3
 PASS ErrorEvent.length is 1
 PASS Event.length is 1
 PASS EventSource.length is 1
-PASS Float32Array.length is 0
-PASS Float64Array.length is 0
+PASS Float32Array.length is 3
+PASS Float64Array.length is 3
 PASS FileReader.length is 0
 FAIL FileReaderSync.length should be 0. Threw exception ReferenceError: Can't find variable: FileReaderSync
 PASS HashChangeEvent.length is 1
-PASS Int16Array.length is 0
-PASS Int32Array.length is 0
-PASS Int8Array.length is 0
+PASS Int16Array.length is 3
+PASS Int32Array.length is 3
+PASS Int8Array.length is 3
 FAIL Intent.length should be 3. Threw exception ReferenceError: Can't find variable: Intent
 PASS MediaController.length is 0
 FAIL MediaStream.length should be 0. Threw exception ReferenceError: Can't find variable: MediaStream
@@ -39,10 +39,10 @@
 PASS StorageEvent.length is 1
 PASS TextTrackCue.length is 0
 PASS TrackEvent.length is 1
-PASS Uint16Array.length is 0
-PASS Uint32Array.length is 0
-PASS Uint8Array.length is 0
-PASS Uint8ClampedArray.length is 0
+PASS Uint16Array.length is 3
+PASS Uint32Array.length is 3
+PASS Uint8Array.length is 3
+PASS Uint8ClampedArray.length is 3
 PASS VTTCue.length is 3
 FAIL WebGLContextEvent.length should be 1. Threw exception ReferenceError: Can't find variable: WebGLContextEvent
 PASS WebKitAnimationEvent.length is 1

Modified: trunk/Source/_javascript_Core/ChangeLog (205931 => 205932)


--- trunk/Source/_javascript_Core/ChangeLog	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-09-14 22:27:19 UTC (rev 205932)
@@ -1,3 +1,18 @@
+2016-09-14  Joseph Pecoraro  <[email protected]>
+
+        test262: TypedArray constructors length should be 3 and configurable
+        https://bugs.webkit.org/show_bug.cgi?id=161955
+
+        Reviewed by Mark Lam.
+
+        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/JSGenericTypedArrayViewConstructorInlines.h:
+        (JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):
+
 2016-09-14  Benjamin Poulain  <[email protected]>
 
         [JSC] Make the rounding-related nodes support any type

Modified: trunk/Source/_javascript_Core/runtime/JSGenericTypedArrayViewConstructorInlines.h (205931 => 205932)


--- trunk/Source/_javascript_Core/runtime/JSGenericTypedArrayViewConstructorInlines.h	2016-09-14 21:24:28 UTC (rev 205931)
+++ trunk/Source/_javascript_Core/runtime/JSGenericTypedArrayViewConstructorInlines.h	2016-09-14 22:27:19 UTC (rev 205932)
@@ -49,7 +49,7 @@
 {
     Base::finishCreation(vm, name);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
-    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontEnum | DontDelete | ReadOnly);
+    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(3), DontEnum | ReadOnly);
     putDirectWithoutTransition(vm, vm.propertyNames->BYTES_PER_ELEMENT, jsNumber(ViewClass::elementSize), DontEnum | ReadOnly | DontDelete);
 
     if (privateAllocator)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to