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

Unified Diff: test/mjsunit/context-variable-assignments.js

Issue 2193793002: Put Scopes into temporary Zone (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 4 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/parsing/parser-base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/context-variable-assignments.js
diff --git a/test/mjsunit/context-variable-assignments.js b/test/mjsunit/context-variable-assignments.js
index 930b969609b5974f2c2ed46ab79610f575a171fd..f564b8f6481fde7ac099b944033edd3f3d9bea28 100644
--- a/test/mjsunit/context-variable-assignments.js
+++ b/test/mjsunit/context-variable-assignments.js
@@ -35,3 +35,19 @@ function foo() {
}
assertEquals("hello world", foo());
+
+// Also test that it works from more deeply nested inner functions:
+
+var v = (function foo2() {
+ var a, b;
+ var bar = function() {
+ var baz = function() {
+ a = b = "bye world";
+ }
+ baz();
+ }
+ bar();
+ return a;
+})();
+
+assertEquals("bye world", v);
« no previous file with comments | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698