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

Unified Diff: test/mjsunit/es6/debug-scope-default-param-with-eval.js

Issue 1961963002: [debugger] make strict eval-scope visible to debugging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 7 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 | « test/mjsunit/debug-function-scopes.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/debug-scope-default-param-with-eval.js
diff --git a/test/mjsunit/es6/debug-scope-default-param-with-eval.js b/test/mjsunit/es6/debug-scope-default-param-with-eval.js
index bcfc38ceb5f27d91494a30f567d9d246231f99f3..d4dc93f2c50e1c6fb21228b08483ed71625500ad 100644
--- a/test/mjsunit/es6/debug-scope-default-param-with-eval.js
+++ b/test/mjsunit/es6/debug-scope-default-param-with-eval.js
@@ -23,17 +23,17 @@ function listener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Break) return;
try {
var frame = exec_state.frame(0);
- var top_scope = frame.scope(0);
- assertTrue(top_scope.scopeObject().propertyNames().includes('y'));
- assertEquals(7, top_scope.scopeObject().property('y').value().value());
+ var block_scope;
if (break_count++ == 0) {
// Inside eval.
- assertEquals([ debug.ScopeType.Block,
+ assertEquals([ debug.ScopeType.Eval,
+ debug.ScopeType.Block,
debug.ScopeType.Closure,
debug.ScopeType.Script,
debug.ScopeType.Global ],
frame.allScopes().map(s => s.scopeType()));
exec_state.prepareStep(Debug.StepAction.StepOut);
+ block_scope = frame.scope(1);
} else {
// Outside of eval.
assertEquals([ debug.ScopeType.Block,
@@ -41,8 +41,12 @@ function listener(event, exec_state, event_data, data) {
debug.ScopeType.Script,
debug.ScopeType.Global ],
frame.allScopes().map(s => s.scopeType()));
+ block_scope = frame.scope(0);
}
+ assertTrue(block_scope.scopeObject().propertyNames().includes('y'));
+ assertEquals(7, block_scope.scopeObject().property('y').value().value());
} catch (e) {
+ print(e);
exception = e;
}
}
« no previous file with comments | « test/mjsunit/debug-function-scopes.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698