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

Unified Diff: test/mjsunit/debug-scopes.js

Issue 1804783002: Remove Scope::scope_contains_with_ bit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
Index: test/mjsunit/debug-scopes.js
diff --git a/test/mjsunit/debug-scopes.js b/test/mjsunit/debug-scopes.js
index 6ddd6a223ccef9ed81b046350860a7a0c4906ddf..bd6688dfa33d8ca0d213559312f92b9e4518f3ac 100644
--- a/test/mjsunit/debug-scopes.js
+++ b/test/mjsunit/debug-scopes.js
@@ -152,7 +152,7 @@ function CheckScopeChainNames(names, exec_state) {
for (var i = 0; i < names.length; i++) {
var scope = exec_state.frame().scope(i);
assertTrue(scope.isScope());
- assertEquals(scope.details().name(), names[i])
+ assertEquals(names[i], scope.details().name())
}
}
@@ -837,10 +837,10 @@ function closure_in_with_1() {
listener_delegate = function(exec_state) {
CheckScopeChain([debug.ScopeType.Local,
debug.ScopeType.With,
- debug.ScopeType.Closure,
adamk 2016/03/14 22:22:11 My understanding is that we simply don't need this
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
CheckScopeContent({x: 2}, 0, exec_state);
+ CheckScopeContent({x: 1}, 1, exec_state);
};
closure_in_with_1();
EndTest();
@@ -861,13 +861,12 @@ listener_delegate = function(exec_state) {
CheckScopeChain([debug.ScopeType.With,
debug.ScopeType.Local,
debug.ScopeType.With,
- debug.ScopeType.Closure,
adamk 2016/03/14 22:22:11 Same here.
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
CheckScopeContent({x: 3}, 0, exec_state);
CheckScopeContent({x: 2}, 1, exec_state);
CheckScopeContent({x: 1}, 2, exec_state);
- CheckScopeChainNames(["inner", "inner", "closure_in_with_2", "closure_in_with_2", undefined, undefined], exec_state)
adamk 2016/03/14 22:22:11 This is the main bit I don't understand: why did w
Yang 2016/03/15 06:53:48 This seems to be a bug. In ScopeIterator::Materia
adamk 2016/03/15 17:45:46 Thanks for the pointer, just moving the code down
+ CheckScopeChainNames(["inner", undefined, "closure_in_with_2", undefined, undefined], exec_state)
};
closure_in_with_2();
EndTest();
@@ -898,7 +897,7 @@ listener_delegate = function(exec_state) {
debug.ScopeType.Closure,
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
- CheckScopeChainNames(["inner", "inner", "closure", "createClosure", undefined, undefined], exec_state)
+ CheckScopeChainNames(["inner", undefined, "closure", "createClosure", undefined, undefined], exec_state)
}
closure_in_with_3();
EndTest();
@@ -975,7 +974,7 @@ listener_delegate = function(exec_state) {
debug.ScopeType.Global], exec_state);
CheckScopeContent({n:10}, 0, exec_state);
CheckScopeContent({e:'Exception'}, 1, exec_state);
- CheckScopeChainNames(["catch_block_2", "catch_block_2", "catch_block_2", undefined, undefined], exec_state)
+ CheckScopeChainNames(["catch_block_2", "catch_block_2", undefined, undefined, undefined], exec_state)
};
catch_block_2();
EndTest();

Powered by Google App Engine
This is Rietveld 408576698