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

Unified Diff: test/mjsunit/es6/debug-blockscopes.js

Issue 1218543003: [es6] Ensure that for-in/of loops have a proper TDZ for their boundnames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 years, 6 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/parser.cc ('k') | test/mjsunit/es6/debug-stepnext-for.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/debug-blockscopes.js
diff --git a/test/mjsunit/es6/debug-blockscopes.js b/test/mjsunit/es6/debug-blockscopes.js
index 39849da95f36d64f8abee64d22ea183fb4604888..31208d41f43bf3d63a2530624b362bafc4eb5ab5 100644
--- a/test/mjsunit/es6/debug-blockscopes.js
+++ b/test/mjsunit/es6/debug-blockscopes.js
@@ -372,13 +372,16 @@ function for_loop_1() {
listener_delegate = function(exec_state) {
CheckScopeChain([debug.ScopeType.Block,
+ debug.ScopeType.Block,
debug.ScopeType.Local,
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
CheckScopeContent({x:'y'}, 0, exec_state);
// The function scope contains a temporary iteration variable, but it is
// hidden to the debugger.
- CheckScopeContent({}, 1, exec_state);
+ // TODO(adamk): This variable is only used to provide a TDZ for the enumerable
+ // expression and should not be visible to the debugger.
+ CheckScopeContent({x:undefined}, 1, exec_state);
};
for_loop_1();
EndTest();
@@ -398,6 +401,7 @@ function for_loop_2() {
listener_delegate = function(exec_state) {
CheckScopeChain([debug.ScopeType.Block,
debug.ScopeType.Block,
+ debug.ScopeType.Block,
debug.ScopeType.Local,
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
@@ -405,7 +409,9 @@ listener_delegate = function(exec_state) {
CheckScopeContent({x:'y'}, 1, exec_state);
// The function scope contains a temporary iteration variable, hidden to the
// debugger.
- CheckScopeContent({}, 2, exec_state);
+ // TODO(adamk): This variable is only used to provide a TDZ for the enumerable
+ // expression and should not be visible to the debugger.
+ CheckScopeContent({x:undefined}, 2, exec_state);
};
for_loop_2();
EndTest();
« no previous file with comments | « src/parser.cc ('k') | test/mjsunit/es6/debug-stepnext-for.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698