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

Unified Diff: test/mjsunit/regress/regress-4703.js

Issue 2088703002: [debugger] add test case for scope materialization and rest params. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-4703.js
diff --git a/test/mjsunit/regress/regress-crbug-609046.js b/test/mjsunit/regress/regress-4703.js
similarity index 53%
copy from test/mjsunit/regress/regress-crbug-609046.js
copy to test/mjsunit/regress/regress-4703.js
index 10b63af3e33feba396f4466098025bef688fd213..dad8a978741d806ce419a4e6117a86dbb51f3aa2 100644
--- a/test/mjsunit/regress/regress-crbug-609046.js
+++ b/test/mjsunit/regress/regress-4703.js
@@ -4,33 +4,27 @@
// Flags: --expose-debug-as debug
-// Test that hidden scopes are correctly walked in the scope chain.
-
-var Debug = debug.Debug;
-var exception = null;
-var delegate = null;
-var done = false;
-
function listener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Break) return;
try {
+ var all_scopes = exec_state.frame().allScopes();
assertEquals([ debug.ScopeType.Block,
+ debug.ScopeType.Local,
debug.ScopeType.Script,
debug.ScopeType.Global ],
- exec_state.frame(0).allScopes().map(s => s.scopeType()));
- done = true;
+ all_scopes.map(scope => scope.scopeType()));
} catch (e) {
exception = e;
}
}
-Debug.setListener(listener);
+debug.Debug.setListener(listener);
-for(let a = 0; a < 3; a++) {
+(function(arg, ...rest) {
+ var one = 1;
+ function inner() {
+ one;
+ arg;
+ }
debugger;
- eval(); // Force context-allocation of everything.
-}
-
-Debug.setListener(null);
-assertNull(exception);
-assertTrue(done);
+})();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698