Title: [197094] releases/WebKitGTK/webkit-2.12
Revision
197094
Author
carlo...@webkit.org
Date
2016-02-25 03:08:42 -0800 (Thu, 25 Feb 2016)

Log Message

Merge r196948 - [JSC shell] Don't put empty arguments array to VM.
https://bugs.webkit.org/show_bug.cgi?id=154516

Patch by Konstantin Tokarev <annu...@yandex.ru> on 2016-02-22
Reviewed by Geoffrey Garen.

This allows arrowfunction-lexical-bind-arguments-top-level test to pass
in jsc as well as in browser.

Source/_javascript_Core:

* jsc.cpp:
(GlobalObject::finishCreation):

LayoutTests:

* js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js:
Removed @ skip annotation.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog (197093 => 197094)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog	2016-02-25 11:08:27 UTC (rev 197093)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog	2016-02-25 11:08:42 UTC (rev 197094)
@@ -1,3 +1,16 @@
+2016-02-22  Konstantin Tokarev  <annu...@yandex.ru>
+
+        [JSC shell] Don't put empty arguments array to VM.
+        https://bugs.webkit.org/show_bug.cgi?id=154516
+
+        Reviewed by Geoffrey Garen.
+
+        This allows arrowfunction-lexical-bind-arguments-top-level test to pass
+        in jsc as well as in browser.
+
+        * js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js:
+        Removed @ skip annotation.
+
 2016-02-21  Chris Dumez  <cdu...@apple.com>
 
         iframe/frame/object.contentDocument should be on the prototype

Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js (197093 => 197094)


--- releases/WebKitGTK/webkit-2.12/LayoutTests/js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js	2016-02-25 11:08:27 UTC (rev 197093)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js	2016-02-25 11:08:42 UTC (rev 197094)
@@ -1,7 +1,3 @@
-// jsc always has arguments, but in browser we do not have arguments, so
-// ignore this test in run-jsc-stress-tests, but run in run-webkit-tests.
-//@ skip
-
 description('Tests for ES6 arrow function lexical bind of arguments on top level');
 
 let foo = () => arguments;

Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog (197093 => 197094)


--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog	2016-02-25 11:08:27 UTC (rev 197093)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog	2016-02-25 11:08:42 UTC (rev 197094)
@@ -1,3 +1,16 @@
+2016-02-22  Konstantin Tokarev  <annu...@yandex.ru>
+
+        [JSC shell] Don't put empty arguments array to VM.
+        https://bugs.webkit.org/show_bug.cgi?id=154516
+
+        Reviewed by Geoffrey Garen.
+
+        This allows arrowfunction-lexical-bind-arguments-top-level test to pass
+        in jsc as well as in browser.
+
+        * jsc.cpp:
+        (GlobalObject::finishCreation):
+
 2016-02-21  Joseph Pecoraro  <pecor...@apple.com>
 
         CodeBlock always visits its unlinked code twice

Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/jsc.cpp (197093 => 197094)


--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/jsc.cpp	2016-02-25 11:08:27 UTC (rev 197093)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/jsc.cpp	2016-02-25 11:08:42 UTC (rev 197094)
@@ -752,11 +752,13 @@
         addFunction(vm, "samplingProfilerStackTraces", functionSamplingProfilerStackTraces, 0);
 #endif
 
-        JSArray* array = constructEmptyArray(globalExec(), 0);
-        for (size_t i = 0; i < arguments.size(); ++i)
-            array->putDirectIndex(globalExec(), i, jsString(globalExec(), arguments[i]));
-        putDirect(vm, Identifier::fromString(globalExec(), "arguments"), array);
-        
+        if (!arguments.isEmpty()) {
+            JSArray* array = constructEmptyArray(globalExec(), 0);
+            for (size_t i = 0; i < arguments.size(); ++i)
+                array->putDirectIndex(globalExec(), i, jsString(globalExec(), arguments[i]));
+            putDirect(vm, Identifier::fromString(globalExec(), "arguments"), array);
+        }
+
         putDirect(vm, Identifier::fromString(globalExec(), "console"), jsUndefined());
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to