Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: test/mjsunit/harmony/regress/regress-4056.js

Issue 1093183003: Function scopes only must have a context if they call sloppy eval (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Fix ScopeInfo context slot calculation Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/scopes.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/regress/regress-4056.js
diff --git a/test/mjsunit/harmony/regress/regress-crbug-465671-null.js b/test/mjsunit/harmony/regress/regress-4056.js
similarity index 55%
copy from test/mjsunit/harmony/regress/regress-crbug-465671-null.js
copy to test/mjsunit/harmony/regress/regress-4056.js
index d24599c38526aca26943669a1b5e153ee652bd9a..d938df0be088185f1990e4b253c5d5c300c39f1f 100644
--- a/test/mjsunit/harmony/regress/regress-crbug-465671-null.js
+++ b/test/mjsunit/harmony/regress/regress-4056.js
@@ -4,13 +4,9 @@
// Flags: --harmony-arrow-functions
-// This used to trigger a segfault because of NULL being accessed.
-function f() {
- var a = [10];
- try {
- f();
- } catch(e) {
- a.map((v) => v + 1);
- }
-}
-f();
+function strictFunctionArrowEval(s) {
+ "use strict";
+ return (()=>eval(s))();
+};
+
+assertEquals(strictFunctionArrowEval("42"), 42)
« no previous file with comments | « src/scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698