Title: [205910] trunk
Revision
205910
Author
[email protected]
Date
2016-09-14 09:47:01 -0700 (Wed, 14 Sep 2016)

Log Message

test262: Array.prototype.slice should always set length
https://bugs.webkit.org/show_bug.cgi?id=161953

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

JSTests:

* test262.yaml:

Source/_javascript_Core:

* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (205909 => 205910)


--- trunk/JSTests/ChangeLog	2016-09-14 16:45:48 UTC (rev 205909)
+++ trunk/JSTests/ChangeLog	2016-09-14 16:47:01 UTC (rev 205910)
@@ -1,3 +1,12 @@
+2016-09-14  Joseph Pecoraro  <[email protected]>
+
+        test262: Array.prototype.slice should always set length
+        https://bugs.webkit.org/show_bug.cgi?id=161953
+
+        Reviewed by Mark Lam.
+
+        * test262.yaml:
+
 2016-09-13  JF Bastien  <[email protected]>
 
         Support jsc shell builtin `read`

Modified: trunk/JSTests/test262.yaml (205909 => 205910)


--- trunk/JSTests/test262.yaml	2016-09-14 16:45:48 UTC (rev 205909)
+++ trunk/JSTests/test262.yaml	2016-09-14 16:47:01 UTC (rev 205910)
@@ -12686,9 +12686,9 @@
 - path: test262/test/built-ins/Array/prototype/splice/name.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js", "../../../../../harness/propertyHelper.js"], [:strict]
 - path: test262/test/built-ins/Array/prototype/splice/set_length_no_args.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/prototype/splice/set_length_no_args.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/prototype/toLocaleString/S15.4.4.3_A1_T1.js
   cmd: runTest262 :normal, "NoException", ["../../../../../harness/assert.js", "../../../../../harness/sta.js"], []
 - path: test262/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A1_T1.js

Modified: trunk/Source/_javascript_Core/ChangeLog (205909 => 205910)


--- trunk/Source/_javascript_Core/ChangeLog	2016-09-14 16:45:48 UTC (rev 205909)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-09-14 16:47:01 UTC (rev 205910)
@@ -1,3 +1,13 @@
+2016-09-14  Joseph Pecoraro  <[email protected]>
+
+        test262: Array.prototype.slice should always set length
+        https://bugs.webkit.org/show_bug.cgi?id=161953
+
+        Reviewed by Mark Lam.
+
+        * runtime/ArrayPrototype.cpp:
+        (JSC::arrayProtoFuncSplice):
+
 2016-09-13  Michael Saboff  <[email protected]>
 
         Promises aren't resolved properly when making a ObjC API callback

Modified: trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp (205909 => 205910)


--- trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp	2016-09-14 16:45:48 UTC (rev 205909)
+++ trunk/Source/_javascript_Core/runtime/ArrayPrototype.cpp	2016-09-14 16:47:01 UTC (rev 205910)
@@ -954,6 +954,7 @@
         }
 
         setLength(exec, result, 0);
+        setLength(exec, thisObj, length);
         return JSValue::encode(result);
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to