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

Side by Side Diff: test/mjsunit/harmony/debug-blockscopes.js

Issue 758603004: Do not reflect uninitialized 'let' and 'const' in scope mirrors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « src/scopeinfo.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 debug.ScopeType.Block, 474 debug.ScopeType.Block,
475 debug.ScopeType.Local, 475 debug.ScopeType.Local,
476 debug.ScopeType.Script, 476 debug.ScopeType.Script,
477 debug.ScopeType.Global], exec_state); 477 debug.ScopeType.Global], exec_state);
478 CheckScopeContent({x:3,y:5}, 0, exec_state); 478 CheckScopeContent({x:3,y:5}, 0, exec_state);
479 CheckScopeContent({x:3,y:5}, 1, exec_state); 479 CheckScopeContent({x:3,y:5}, 1, exec_state);
480 CheckScopeContent({}, 2, exec_state); 480 CheckScopeContent({}, 2, exec_state);
481 }; 481 };
482 for_loop_5(); 482 for_loop_5();
483 EndTest(); 483 EndTest();
484
485
486 // Uninitialized variables
487 BeginTest("Uninitialized 1");
488
489 function uninitialized_1() {
490 {
491 debugger;
492 let x = 1;
493 }
494 }
495
496 listener_delegate = function(exec_state) {
497 CheckScopeChain([debug.ScopeType.Block,
498 debug.ScopeType.Local,
499 debug.ScopeType.Script,
500 debug.ScopeType.Global], exec_state);
501 CheckScopeContent({}, 0, exec_state);
aandrey 2014/12/08 13:12:22 DevTools will not show empty Block scopes. Should
Dmitry Lomov (no reviews) 2014/12/08 14:34:09 I do not know what is best here. This change makes
502 };
503 uninitialized_1();
504 EndTest();
OLDNEW
« no previous file with comments | « src/scopeinfo.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698