Title: [196948] trunk
- Revision
- 196948
- Author
- [email protected]
- Date
- 2016-02-22 11:41:00 -0800 (Mon, 22 Feb 2016)
Log Message
[JSC shell] Don't put empty arguments array to VM.
https://bugs.webkit.org/show_bug.cgi?id=154516
Patch by Konstantin Tokarev <[email protected]> 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: trunk/LayoutTests/ChangeLog (196947 => 196948)
--- trunk/LayoutTests/ChangeLog 2016-02-22 19:32:47 UTC (rev 196947)
+++ trunk/LayoutTests/ChangeLog 2016-02-22 19:41:00 UTC (rev 196948)
@@ -1,3 +1,16 @@
+2016-02-22 Konstantin Tokarev <[email protected]>
+
+ [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-22 Ryan Haddad <[email protected]>
Rebaseline tests for ios-simulator after W3C HTML/DOM re-sync in r196883
Modified: trunk/LayoutTests/js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js (196947 => 196948)
--- trunk/LayoutTests/js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js 2016-02-22 19:32:47 UTC (rev 196947)
+++ trunk/LayoutTests/js/script-tests/arrowfunction-lexical-bind-arguments-top-level.js 2016-02-22 19:41:00 UTC (rev 196948)
@@ -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: trunk/Source/_javascript_Core/ChangeLog (196947 => 196948)
--- trunk/Source/_javascript_Core/ChangeLog 2016-02-22 19:32:47 UTC (rev 196947)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-02-22 19:41:00 UTC (rev 196948)
@@ -1,5 +1,18 @@
2016-02-22 Konstantin Tokarev <[email protected]>
+ [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-22 Konstantin Tokarev <[email protected]>
+
[cmake] Moved library setup code to WEBKIT_FRAMEWORK macro.
https://bugs.webkit.org/show_bug.cgi?id=154450
Modified: trunk/Source/_javascript_Core/jsc.cpp (196947 => 196948)
--- trunk/Source/_javascript_Core/jsc.cpp 2016-02-22 19:32:47 UTC (rev 196947)
+++ trunk/Source/_javascript_Core/jsc.cpp 2016-02-22 19:41:00 UTC (rev 196948)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes