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

Unified Diff: test/mjsunit/debug-evaluate-shadowed-context.js

Issue 1513183003: [debugger] debug-evaluate should not not modify local values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@arrowthis
Patch Set: addressed comments. 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
« no previous file with comments | « test/mjsunit/debug-evaluate-modify-catch-block-scope.js ('k') | test/mjsunit/es6/debug-blockscopes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-evaluate-shadowed-context.js
diff --git a/test/mjsunit/debug-evaluate-shadowed-context.js b/test/mjsunit/debug-evaluate-shadowed-context.js
index 221efb39d071e07832908c0c67164b66b6860a6d..6847a93f66216d1306007022211d4758a8b5da66 100644
--- a/test/mjsunit/debug-evaluate-shadowed-context.js
+++ b/test/mjsunit/debug-evaluate-shadowed-context.js
@@ -29,7 +29,8 @@ function listener(event, exec_state, event_data, data) {
}
assertEquals("[object global]",
String(exec_state.frame(0).evaluate("this").value()));
- exec_state.frame(0).evaluate("y = 'Y'");
+ assertEquals("y", exec_state.frame(0).evaluate("y").value());
+ assertEquals("a", exec_state.frame(0).evaluate("a").value());
exec_state.frame(0).evaluate("a = 'A'");
assertThrows(() => exec_state.frame(0).evaluate("z"), ReferenceError);
} catch (e) {
@@ -41,7 +42,7 @@ function listener(event, exec_state, event_data, data) {
Debug.setListener(listener);
var a = "a";
-assertEquals("Y", (function() {
+(function() {
var x = 1; // context allocate x
(() => x);
var y = "y";
@@ -54,12 +55,12 @@ assertEquals("Y", (function() {
})(); // 2
})(); // 1
return y;
-})());
+})();
assertEquals("A", a);
a = "a";
-assertEquals("Y", (function() {
+(function() {
var x = 1; // context allocate x
(() => x);
var y = "y";
@@ -74,7 +75,7 @@ assertEquals("Y", (function() {
})(); // 2
})(); // 1
return y;
-})());
+})();
assertEquals("A", a);
« no previous file with comments | « test/mjsunit/debug-evaluate-modify-catch-block-scope.js ('k') | test/mjsunit/es6/debug-blockscopes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698