Title: [208639] trunk
Revision
208639
Author
joep...@webkit.org
Date
2016-11-11 19:10:31 -0800 (Fri, 11 Nov 2016)

Log Message

test262: DataView get methods should allow for missing offset, set methods should allow for missing value
https://bugs.webkit.org/show_bug.cgi?id=164451

Reviewed by Darin Adler.

JSTests:

* test262.yaml:

Source/_javascript_Core:

* runtime/JSDataViewPrototype.cpp:
(JSC::getData):
Missing offset is still valid and will be coerced to 0.

(JSC::setData):
Missing value is still valid and will be coerced to 0.

LayoutTests:

* fast/canvas/webgl/data-view-test-expected.txt:
* fast/canvas/webgl/data-view-test.html:
Create a DataView large enough so that the get/set operations don't fail
due to out of bounds access, and assert that they do not throw, because
the undefined offset and value parameters get converted to 0.

* webgl/1.0.2/conformance/typedarrays/data-view-test-expected.txt:
This test is wrong. Leave the test alone but update our copy.

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (208638 => 208639)


--- trunk/JSTests/ChangeLog	2016-11-12 03:01:24 UTC (rev 208638)
+++ trunk/JSTests/ChangeLog	2016-11-12 03:10:31 UTC (rev 208639)
@@ -1,3 +1,12 @@
+2016-11-11  Joseph Pecoraro  <pecor...@apple.com>
+
+        test262: DataView get methods should allow for missing offset, set methods should allow for missing value
+        https://bugs.webkit.org/show_bug.cgi?id=164451
+
+        Reviewed by Darin Adler.
+
+        * test262.yaml:
+
 2016-11-11  Saam Barati  <sbar...@apple.com>
 
         We should have a more concise way of determining when we're varargs calling a function using rest parameters

Modified: trunk/JSTests/test262.yaml (208638 => 208639)


--- trunk/JSTests/test262.yaml	2016-11-12 03:01:24 UTC (rev 208638)
+++ trunk/JSTests/test262.yaml	2016-11-12 03:10:31 UTC (rev 208639)
@@ -13778,9 +13778,9 @@
 - path: test262/test/built-ins/DataView/prototype/getFloat32/to-boolean-littleendian.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/getFloat32/toindex-byteoffset.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/DataView/prototype/getFloat32/toindex-byteoffset.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/DataView/prototype/getFloat64/detached-buffer-after-toindex-byteoffset.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/getFloat64/detached-buffer-after-toindex-byteoffset.js
@@ -13854,9 +13854,9 @@
 - path: test262/test/built-ins/DataView/prototype/getFloat64/to-boolean-littleendian.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/getFloat64/toindex-byteoffset.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/DataView/prototype/getFloat64/toindex-byteoffset.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/DataView/prototype/getInt16/detached-buffer-after-toindex-byteoffset.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/getInt16/detached-buffer-after-toindex-byteoffset.js
@@ -13918,9 +13918,9 @@
 - path: test262/test/built-ins/DataView/prototype/getInt16/to-boolean-littleendian.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/getInt16/toindex-byteoffset.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/DataView/prototype/getInt16/toindex-byteoffset.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/DataView/prototype/getInt32/detached-buffer-after-toindex-byteoffset.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/getInt32/detached-buffer-after-toindex-byteoffset.js
@@ -13982,9 +13982,9 @@
 - path: test262/test/built-ins/DataView/prototype/getInt32/to-boolean-littleendian.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/getInt32/toindex-byteoffset.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/DataView/prototype/getInt32/toindex-byteoffset.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/DataView/prototype/getInt8/detached-buffer-after-toindex-byteoffset.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/getInt8/detached-buffer-after-toindex-byteoffset.js
@@ -14042,9 +14042,9 @@
 - path: test262/test/built-ins/DataView/prototype/getInt8/this-is-not-object.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/getInt8/toindex-byteoffset.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/DataView/prototype/getInt8/toindex-byteoffset.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/DataView/prototype/getUint16/detached-buffer-after-toindex-byteoffset.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/getUint16/detached-buffer-after-toindex-byteoffset.js
@@ -14106,9 +14106,9 @@
 - path: test262/test/built-ins/DataView/prototype/getUint16/to-boolean-littleendian.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/getUint16/toindex-byteoffset.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/DataView/prototype/getUint16/toindex-byteoffset.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/DataView/prototype/getUint32/detached-buffer-after-toindex-byteoffset.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/getUint32/detached-buffer-after-toindex-byteoffset.js
@@ -14170,9 +14170,9 @@
 - path: test262/test/built-ins/DataView/prototype/getUint32/to-boolean-littleendian.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/getUint32/toindex-byteoffset.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/DataView/prototype/getUint32/toindex-byteoffset.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/DataView/prototype/getUint8/detached-buffer-after-toindex-byteoffset.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/getUint8/detached-buffer-after-toindex-byteoffset.js
@@ -14230,9 +14230,9 @@
 - path: test262/test/built-ins/DataView/prototype/getUint8/this-is-not-object.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/getUint8/toindex-byteoffset.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/DataView/prototype/getUint8/toindex-byteoffset.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/DataView/prototype/setFloat32/detached-buffer-after-number-value.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/setFloat32/detached-buffer-after-number-value.js
@@ -14270,9 +14270,9 @@
 - path: test262/test/built-ins/DataView/prototype/setFloat32/negative-byteoffset-throws.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setFloat32/no-value-arg.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/DataView/prototype/setFloat32/no-value-arg.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/DataView/prototype/setFloat32/range-check-after-value-conversion.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/DataView/prototype/setFloat32/range-check-after-value-conversion.js
@@ -14314,9 +14314,9 @@
 - path: test262/test/built-ins/DataView/prototype/setFloat32/to-boolean-littleendian.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setFloat32/toindex-byteoffset.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/DataView/prototype/setFloat32/toindex-byteoffset.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/DataView/prototype/setFloat64/detached-buffer-after-number-value.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-number-value.js
@@ -14354,9 +14354,9 @@
 - path: test262/test/built-ins/DataView/prototype/setFloat64/negative-byteoffset-throws.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setFloat64/no-value-arg.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/DataView/prototype/setFloat64/no-value-arg.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/DataView/prototype/setFloat64/range-check-after-value-conversion.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/DataView/prototype/setFloat64/range-check-after-value-conversion.js
@@ -14398,9 +14398,9 @@
 - path: test262/test/built-ins/DataView/prototype/setFloat64/to-boolean-littleendian.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setFloat64/toindex-byteoffset.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/DataView/prototype/setFloat64/toindex-byteoffset.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/DataView/prototype/setInt16/detached-buffer-after-number-value.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/setInt16/detached-buffer-after-number-value.js
@@ -14438,9 +14438,9 @@
 - path: test262/test/built-ins/DataView/prototype/setInt16/negative-byteoffset-throws.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setInt16/no-value-arg.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/DataView/prototype/setInt16/no-value-arg.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/DataView/prototype/setInt16/range-check-after-value-conversion.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/DataView/prototype/setInt16/range-check-after-value-conversion.js
@@ -14482,9 +14482,9 @@
 - path: test262/test/built-ins/DataView/prototype/setInt16/to-boolean-littleendian.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setInt16/toindex-byteoffset.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/DataView/prototype/setInt16/toindex-byteoffset.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/DataView/prototype/setInt32/detached-buffer-after-number-value.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/setInt32/detached-buffer-after-number-value.js
@@ -14522,9 +14522,9 @@
 - path: test262/test/built-ins/DataView/prototype/setInt32/negative-byteoffset-throws.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setInt32/no-value-arg.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/DataView/prototype/setInt32/no-value-arg.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/DataView/prototype/setInt32/range-check-after-value-conversion.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/DataView/prototype/setInt32/range-check-after-value-conversion.js
@@ -14566,9 +14566,9 @@
 - path: test262/test/built-ins/DataView/prototype/setInt32/to-boolean-littleendian.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setInt32/toindex-byteoffset.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/DataView/prototype/setInt32/toindex-byteoffset.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/DataView/prototype/setInt8/detached-buffer-after-number-value.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/setInt8/detached-buffer-after-number-value.js
@@ -14606,9 +14606,9 @@
 - path: test262/test/built-ins/DataView/prototype/setInt8/negative-byteoffset-throws.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setInt8/no-value-arg.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/DataView/prototype/setInt8/no-value-arg.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/DataView/prototype/setInt8/range-check-after-value-conversion.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/DataView/prototype/setInt8/range-check-after-value-conversion.js
@@ -14642,9 +14642,9 @@
 - path: test262/test/built-ins/DataView/prototype/setInt8/this-is-not-object.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setInt8/toindex-byteoffset.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/DataView/prototype/setInt8/toindex-byteoffset.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/DataView/prototype/setUint16/detached-buffer-after-number-value.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/setUint16/detached-buffer-after-number-value.js
@@ -14682,9 +14682,9 @@
 - path: test262/test/built-ins/DataView/prototype/setUint16/negative-byteoffset-throws.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setUint16/no-value-arg.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/DataView/prototype/setUint16/no-value-arg.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/DataView/prototype/setUint16/range-check-after-value-conversion.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/DataView/prototype/setUint16/range-check-after-value-conversion.js
@@ -14726,9 +14726,9 @@
 - path: test262/test/built-ins/DataView/prototype/setUint16/to-boolean-littleendian.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setUint16/toindex-byteoffset.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/DataView/prototype/setUint16/toindex-byteoffset.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/DataView/prototype/setUint32/detached-buffer-after-number-value.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/setUint32/detached-buffer-after-number-value.js
@@ -14766,9 +14766,9 @@
 - path: test262/test/built-ins/DataView/prototype/setUint32/negative-byteoffset-throws.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setUint32/no-value-arg.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/DataView/prototype/setUint32/no-value-arg.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/DataView/prototype/setUint32/range-check-after-value-conversion.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/DataView/prototype/setUint32/range-check-after-value-conversion.js
@@ -14810,9 +14810,9 @@
 - path: test262/test/built-ins/DataView/prototype/setUint32/to-boolean-littleendian.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setUint32/toindex-byteoffset.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/DataView/prototype/setUint32/toindex-byteoffset.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/DataView/prototype/setUint8/detached-buffer-after-number-value.js
   cmd: runTest262 :fail, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/detachArrayBuffer.js"], []
 - path: test262/test/built-ins/DataView/prototype/setUint8/detached-buffer-after-number-value.js
@@ -14850,9 +14850,9 @@
 - path: test262/test/built-ins/DataView/prototype/setUint8/negative-byteoffset-throws.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setUint8/no-value-arg.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/DataView/prototype/setUint8/no-value-arg.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/DataView/prototype/setUint8/range-check-after-value-conversion.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/DataView/prototype/setUint8/range-check-after-value-conversion.js
@@ -14886,9 +14886,9 @@
 - path: test262/test/built-ins/DataView/prototype/setUint8/this-is-not-object.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], [:strict]
 - path: test262/test/built-ins/DataView/prototype/setUint8/toindex-byteoffset.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/DataView/prototype/setUint8/toindex-byteoffset.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/DataView/prototype.js
   cmd: runTest262 :normal, "NoException", ["../../../harness/assert.js", "../../../harness/sta.js", "../../../harness/propertyHelper.js"], []
 - path: test262/test/built-ins/DataView/prototype.js

Modified: trunk/LayoutTests/ChangeLog (208638 => 208639)


--- trunk/LayoutTests/ChangeLog	2016-11-12 03:01:24 UTC (rev 208638)
+++ trunk/LayoutTests/ChangeLog	2016-11-12 03:10:31 UTC (rev 208639)
@@ -1,3 +1,19 @@
+2016-11-11  Joseph Pecoraro  <pecor...@apple.com>
+
+        test262: DataView get methods should allow for missing offset, set methods should allow for missing value
+        https://bugs.webkit.org/show_bug.cgi?id=164451
+
+        Reviewed by Darin Adler.
+
+        * fast/canvas/webgl/data-view-test-expected.txt:
+        * fast/canvas/webgl/data-view-test.html:
+        Create a DataView large enough so that the get/set operations don't fail
+        due to out of bounds access, and assert that they do not throw, because
+        the undefined offset and value parameters get converted to 0.
+
+        * webgl/1.0.2/conformance/typedarrays/data-view-test-expected.txt:
+        This test is wrong. Leave the test alone but update our copy.
+
 2016-11-11  Ryan Haddad  <ryanhad...@apple.com>
 
         Skip editing/input/focus-change-with-marked-text.html everywhere except ios-simulator-wk1.

Modified: trunk/LayoutTests/fast/canvas/webgl/data-view-test-expected.txt (208638 => 208639)


--- trunk/LayoutTests/fast/canvas/webgl/data-view-test-expected.txt	2016-11-12 03:01:24 UTC (rev 208638)
+++ trunk/LayoutTests/fast/canvas/webgl/data-view-test-expected.txt	2016-11-12 03:10:31 UTC (rev 208639)
@@ -304,15 +304,15 @@
 PASS view.getFloat64(-5) threw exception RangeError: byteOffset cannot be negative.
 PASS view.getFloat64(-9) threw exception RangeError: byteOffset cannot be negative.
 
-Test for wrong arguments passed to get methods
-PASS view.getInt8() threw exception TypeError: Need at least one argument (the byteOffset).
-PASS view.getUint8() threw exception TypeError: Need at least one argument (the byteOffset).
-PASS view.getInt16() threw exception TypeError: Need at least one argument (the byteOffset).
-PASS view.getUint16() threw exception TypeError: Need at least one argument (the byteOffset).
-PASS view.getInt32() threw exception TypeError: Need at least one argument (the byteOffset).
-PASS view.getUint32() threw exception TypeError: Need at least one argument (the byteOffset).
-PASS view.getFloat32() threw exception TypeError: Need at least one argument (the byteOffset).
-PASS view.getFloat64() threw exception TypeError: Need at least one argument (the byteOffset).
+Test for missing arguments passed to get methods
+PASS view.getInt8() did not throw exception.
+PASS view.getUint8() did not throw exception.
+PASS view.getInt16() did not throw exception.
+PASS view.getUint16() did not throw exception.
+PASS view.getInt32() did not throw exception.
+PASS view.getUint32() did not throw exception.
+PASS view.getFloat32() did not throw exception.
+PASS view.getFloat64() did not throw exception.
 
 Test for set methods that work
 PASS view.setInt8(0, 0) is undefined.
@@ -794,23 +794,23 @@
 PASS view.setFloat64(-5, 0) threw exception RangeError: byteOffset cannot be negative.
 PASS view.setFloat64(-9, 0) threw exception RangeError: byteOffset cannot be negative.
 
-Test for wrong arguments passed to set methods
-PASS view.setInt8() threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setUint8() threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setInt16() threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setUint16() threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setInt32() threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setUint32() threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setFloat32() threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setFloat64() threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setInt8(1) threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setUint8(1) threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setInt16(1) threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setUint16(1) threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setInt32(1) threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setUint32(1) threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setFloat32(1) threw exception TypeError: Need at least two argument (the byteOffset and value).
-PASS view.setFloat64(1) threw exception TypeError: Need at least two argument (the byteOffset and value).
+Test for missing arguments passed to set methods
+PASS view.setInt8() did not throw exception.
+PASS view.setUint8() did not throw exception.
+PASS view.setInt16() did not throw exception.
+PASS view.setUint16() did not throw exception.
+PASS view.setInt32() did not throw exception.
+PASS view.setUint32() did not throw exception.
+PASS view.setFloat32() did not throw exception.
+PASS view.setFloat64() did not throw exception.
+PASS view.setInt8(1) did not throw exception.
+PASS view.setUint8(1) did not throw exception.
+PASS view.setInt16(1) did not throw exception.
+PASS view.setUint16(1) did not throw exception.
+PASS view.setInt32(1) did not throw exception.
+PASS view.setUint32(1) did not throw exception.
+PASS view.setFloat32(1) did not throw exception.
+PASS view.setFloat64(1) did not throw exception.
 
 Test for indexing that should not work
 PASS view[0] is undefined.

Modified: trunk/LayoutTests/fast/canvas/webgl/data-view-test.html (208638 => 208639)


--- trunk/LayoutTests/fast/canvas/webgl/data-view-test.html	2016-11-12 03:01:24 UTC (rev 208638)
+++ trunk/LayoutTests/fast/canvas/webgl/data-view-test.html	2016-11-12 03:10:31 UTC (rev 208639)
@@ -293,16 +293,16 @@
     runNegativeIndexTests(true);
 
     debug("");
-    debug("Test for wrong arguments passed to get methods");
-    view = new DataView((new Uint8Array([1, 2])).buffer);
-    shouldThrow("view.getInt8()");
-    shouldThrow("view.getUint8()");
-    shouldThrow("view.getInt16()");
-    shouldThrow("view.getUint16()");
-    shouldThrow("view.getInt32()");
-    shouldThrow("view.getUint32()");
-    shouldThrow("view.getFloat32()");
-    shouldThrow("view.getFloat64()");
+    debug("Test for missing arguments passed to get methods");
+    view = new DataView((new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8])).buffer);
+    shouldNotThrow("view.getInt8()");
+    shouldNotThrow("view.getUint8()");
+    shouldNotThrow("view.getInt16()");
+    shouldNotThrow("view.getUint16()");
+    shouldNotThrow("view.getInt32()");
+    shouldNotThrow("view.getUint32()");
+    shouldNotThrow("view.getFloat32()");
+    shouldNotThrow("view.getFloat64()");
 }
 
 function runSetTests()
@@ -322,24 +322,24 @@
     runNegativeIndexTests(false);
 
     debug("");
-    debug("Test for wrong arguments passed to set methods");
-    view = new DataView((new Uint8Array([1, 2])).buffer);
-    shouldThrow("view.setInt8()");
-    shouldThrow("view.setUint8()");
-    shouldThrow("view.setInt16()");
-    shouldThrow("view.setUint16()");
-    shouldThrow("view.setInt32()");
-    shouldThrow("view.setUint32()");
-    shouldThrow("view.setFloat32()");
-    shouldThrow("view.setFloat64()");
-    shouldThrow("view.setInt8(1)");
-    shouldThrow("view.setUint8(1)");
-    shouldThrow("view.setInt16(1)");
-    shouldThrow("view.setUint16(1)");
-    shouldThrow("view.setInt32(1)");
-    shouldThrow("view.setUint32(1)");
-    shouldThrow("view.setFloat32(1)");
-    shouldThrow("view.setFloat64(1)");
+    debug("Test for missing arguments passed to set methods");
+    view = new DataView((new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8])).buffer);
+    shouldNotThrow("view.setInt8()");
+    shouldNotThrow("view.setUint8()");
+    shouldNotThrow("view.setInt16()");
+    shouldNotThrow("view.setUint16()");
+    shouldNotThrow("view.setInt32()");
+    shouldNotThrow("view.setUint32()");
+    shouldNotThrow("view.setFloat32()");
+    shouldNotThrow("view.setFloat64()");
+    shouldNotThrow("view.setInt8(1)");
+    shouldNotThrow("view.setUint8(1)");
+    shouldNotThrow("view.setInt16(1)");
+    shouldNotThrow("view.setUint16(1)");
+    shouldNotThrow("view.setInt32(1)");
+    shouldNotThrow("view.setUint32(1)");
+    shouldNotThrow("view.setFloat32(1)");
+    shouldNotThrow("view.setFloat64(1)");
 }
 
 function runIndexingTests()

Modified: trunk/LayoutTests/webgl/1.0.2/conformance/typedarrays/data-view-test-expected.txt (208638 => 208639)


--- trunk/LayoutTests/webgl/1.0.2/conformance/typedarrays/data-view-test-expected.txt	2016-11-12 03:01:24 UTC (rev 208638)
+++ trunk/LayoutTests/webgl/1.0.2/conformance/typedarrays/data-view-test-expected.txt	2016-11-12 03:10:31 UTC (rev 208639)
@@ -1,5 +1,5 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../resources/webgl_test_files/conformance/typedarrays/data-view-test.html
-PASS
+FAIL
 

Modified: trunk/Source/_javascript_Core/ChangeLog (208638 => 208639)


--- trunk/Source/_javascript_Core/ChangeLog	2016-11-12 03:01:24 UTC (rev 208638)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-11-12 03:10:31 UTC (rev 208639)
@@ -1,3 +1,17 @@
+2016-11-11  Joseph Pecoraro  <pecor...@apple.com>
+
+        test262: DataView get methods should allow for missing offset, set methods should allow for missing value
+        https://bugs.webkit.org/show_bug.cgi?id=164451
+
+        Reviewed by Darin Adler.
+
+        * runtime/JSDataViewPrototype.cpp:
+        (JSC::getData):
+        Missing offset is still valid and will be coerced to 0.
+
+        (JSC::setData):
+        Missing value is still valid and will be coerced to 0.
+
 2016-11-11  Saam Barati  <sbar...@apple.com>
 
         We should have a more concise way of determining when we're varargs calling a function using rest parameters

Modified: trunk/Source/_javascript_Core/runtime/JSDataViewPrototype.cpp (208638 => 208639)


--- trunk/Source/_javascript_Core/runtime/JSDataViewPrototype.cpp	2016-11-12 03:01:24 UTC (rev 208638)
+++ trunk/Source/_javascript_Core/runtime/JSDataViewPrototype.cpp	2016-11-12 03:10:31 UTC (rev 208639)
@@ -129,10 +129,7 @@
     if (!dataView)
         return throwVMTypeError(exec, scope, ASCIILiteral("Receiver of DataView method must be a DataView"));
     
-    if (!exec->argumentCount())
-        return throwVMTypeError(exec, scope, ASCIILiteral("Need at least one argument (the byteOffset)"));
-    
-    unsigned byteOffset = exec->uncheckedArgument(0).toIndex(exec, "byteOffset");
+    unsigned byteOffset = exec->argument(0).toIndex(exec, "byteOffset");
     RETURN_IF_EXCEPTION(scope, encodedJSValue());
     
     bool littleEndian = false;
@@ -175,9 +172,6 @@
     if (!dataView)
         return throwVMTypeError(exec, scope, ASCIILiteral("Receiver of DataView method must be a DataView"));
     
-    if (exec->argumentCount() < 2)
-        return throwVMTypeError(exec, scope, ASCIILiteral("Need at least two argument (the byteOffset and value)"));
-    
     unsigned byteOffset = exec->uncheckedArgument(0).toIndex(exec, "byteOffset");
     RETURN_IF_EXCEPTION(scope, encodedJSValue());
 
@@ -187,7 +181,7 @@
         uint8_t rawBytes[dataSize];
     } u;
 
-    u.value = toNativeFromValue<Adaptor>(exec, exec->uncheckedArgument(1));
+    u.value = toNativeFromValue<Adaptor>(exec, exec->argument(1));
     RETURN_IF_EXCEPTION(scope, encodedJSValue());
     
     bool littleEndian = false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to