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

Unified Diff: test/mjsunit/debug-evaluate-closure.js

Issue 1500933002: [debugger] fix debug-evaluate wrt shadowed context var. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add TODO Created 5 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 side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/debug-evaluate-closure.js
diff --git a/test/mjsunit/debug-evaluate-closure.js b/test/mjsunit/debug-evaluate-closure.js
index 778defd0ab7a03cb4d58a965b3469fc6f1bb145f..7e8fb91da7e4f23ac2c155432fb26db2dd9a64d4 100644
--- a/test/mjsunit/debug-evaluate-closure.js
+++ b/test/mjsunit/debug-evaluate-closure.js
@@ -36,8 +36,11 @@ function listener(event, exec_state, event_data, data) {
assertEquals("goo", exec_state.frame(0).evaluate("goo").value());
exec_state.frame(0).evaluate("goo = 'goo foo'");
assertEquals("bar return", exec_state.frame(0).evaluate("bar()").value());
- assertEquals("inner bar", exec_state.frame(0).evaluate("inner").value());
- assertEquals("outer bar", exec_state.frame(0).evaluate("outer").value());
+ // Check that calling bar() has no effect to context-allocated variables.
+ // TODO(yangguo): reevaluate this if we no longer update context from copy.
+ assertEquals("inner", exec_state.frame(0).evaluate("inner").value());
+ assertEquals("outer", exec_state.frame(0).evaluate("outer").value());
+
assertEquals("baz inner", exec_state.frame(0).evaluate("baz").value());
assertEquals("baz outer", exec_state.frame(1).evaluate("baz").value());
exec_state.frame(0).evaluate("w = 'w foo'");
@@ -67,8 +70,8 @@ function foo() {
with (withv) {
var bar = function bar() {
assertEquals("goo foo", goo);
- inner = "inner bar";
- outer = "outer bar";
+ inner = "inner bar"; // this has no effect, when called from debug-eval
+ outer = "outer bar"; // this has no effect, when called from debug-eval
v = "v bar";
return "bar return";
};

Powered by Google App Engine
This is Rietveld 408576698