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

Unified Diff: src/runtime.cc

Issue 17644013: Fix misleading names and comments in mute local variables debugger helper (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 7 years, 6 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 | « src/mirror-debugger.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index c932773a5fdf75bd248a97523ee30ce3e04a1df1..081774f21a614d5ea61234735c7789098aa7da2c 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -12422,8 +12422,10 @@ static MaybeObject* DebugEvaluate(Isolate* isolate,
// stack frame is currently stopped when we compile and run the (direct) eval.
// Returns array of
// #0: evaluate result
-// #1: local variables scope materizalized as object before evaluation
-// #2: local variables scope materizalized as object after evaluation
+// #1: local variables materizalized again as object after evaluation, contain
+// original variable values as they remained on stack
+// #2: local variables materizalized as object before evaluation (and possibly
+// modified by expression having been executed)
// Since user expression only reaches (and modifies) copies of local variables,
// those copies are returned to the caller to allow tracking the changes and
// manually updating the actual variables.
@@ -12533,14 +12535,14 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugEvaluate) {
}
Handle<Object> evaluate_result(evaluate_result_object, isolate);
- Handle<JSObject> local_scope_after = MaterializeLocalScopeWithFrameInspector(
- isolate, frame, &frame_inspector);
+ Handle<JSObject> local_scope_control_copy =
+ MaterializeLocalScopeWithFrameInspector(isolate, frame,
+ &frame_inspector);
- Handle<FixedArray> resultArray =
- isolate->factory()->NewFixedArray(3);
+ Handle<FixedArray> resultArray = isolate->factory()->NewFixedArray(3);
resultArray->set(0, *evaluate_result);
+ resultArray->set(1, *local_scope_control_copy);
resultArray->set(2, *local_scope);
- resultArray->set(1, *local_scope_after);
return *(isolate->factory()->NewJSArrayWithElements(resultArray));
}
« no previous file with comments | « src/mirror-debugger.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698