Commit f0c7bc37 authored by peter.rybin@gmail.com's avatar peter.rybin@gmail.com

Fix misleading names and comments in mute local variables debugger helper

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/17644013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 00709075
...@@ -1707,18 +1707,18 @@ FrameMirror.prototype.evaluate = function(source, disable_break, ...@@ -1707,18 +1707,18 @@ FrameMirror.prototype.evaluate = function(source, disable_break,
opt_context_object); opt_context_object);
// Silently ignore local variables changes if the frame is optimized. // Silently ignore local variables changes if the frame is optimized.
if (!this.isOptimizedFrame()) { if (!this.isOptimizedFrame()) {
var local_scope_before = result_array[1]; var local_scope_on_stack = result_array[1];
var local_scope_after = result_array[2]; var local_scope_modifed = result_array[2];
for (var n in local_scope_after) { for (var n in local_scope_modifed) {
var value_before = local_scope_before[n]; var value_on_stack = local_scope_on_stack[n];
var value_after = local_scope_after[n]; var value_modifed = local_scope_modifed[n];
if (value_before !== value_after) { if (value_on_stack !== value_modifed) {
%SetScopeVariableValue(this.break_id_, %SetScopeVariableValue(this.break_id_,
this.details_.frameId(), this.details_.frameId(),
this.details_.inlinedFrameIndex(), this.details_.inlinedFrameIndex(),
0, 0,
n, n,
value_after); value_modifed);
} }
} }
} }
......
...@@ -12422,8 +12422,10 @@ static MaybeObject* DebugEvaluate(Isolate* isolate, ...@@ -12422,8 +12422,10 @@ static MaybeObject* DebugEvaluate(Isolate* isolate,
// stack frame is currently stopped when we compile and run the (direct) eval. // stack frame is currently stopped when we compile and run the (direct) eval.
// Returns array of // Returns array of
// #0: evaluate result // #0: evaluate result
// #1: local variables scope materizalized as object before evaluation // #1: local variables materizalized again as object after evaluation, contain
// #2: local variables scope materizalized as object after evaluation // 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, // Since user expression only reaches (and modifies) copies of local variables,
// those copies are returned to the caller to allow tracking the changes and // those copies are returned to the caller to allow tracking the changes and
// manually updating the actual variables. // manually updating the actual variables.
...@@ -12533,14 +12535,14 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugEvaluate) { ...@@ -12533,14 +12535,14 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugEvaluate) {
} }
Handle<Object> evaluate_result(evaluate_result_object, isolate); Handle<Object> evaluate_result(evaluate_result_object, isolate);
Handle<JSObject> local_scope_after = MaterializeLocalScopeWithFrameInspector( Handle<JSObject> local_scope_control_copy =
isolate, frame, &frame_inspector); MaterializeLocalScopeWithFrameInspector(isolate, frame,
&frame_inspector);
Handle<FixedArray> resultArray = Handle<FixedArray> resultArray = isolate->factory()->NewFixedArray(3);
isolate->factory()->NewFixedArray(3);
resultArray->set(0, *evaluate_result); resultArray->set(0, *evaluate_result);
resultArray->set(1, *local_scope_control_copy);
resultArray->set(2, *local_scope); resultArray->set(2, *local_scope);
resultArray->set(1, *local_scope_after);
return *(isolate->factory()->NewJSArrayWithElements(resultArray)); return *(isolate->factory()->NewJSArrayWithElements(resultArray));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment