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); |
+})(); |