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,
opt_context_object);
// Silently ignore local variables changes if the frame is optimized.
if (!this.isOptimizedFrame()) {
var local_scope_before = result_array[1];
var local_scope_after = result_array[2];
for (var n in local_scope_after) {
var value_before = local_scope_before[n];
var value_after = local_scope_after[n];
if (value_before !== value_after) {
var local_scope_on_stack = result_array[1];
var local_scope_modifed = result_array[2];
for (var n in local_scope_modifed) {
var value_on_stack = local_scope_on_stack[n];
var value_modifed = local_scope_modifed[n];
if (value_on_stack !== value_modifed) {
%SetScopeVariableValue(this.break_id_,
this.details_.frameId(),
this.details_.inlinedFrameIndex(),
0,
n,
value_after);
value_modifed);
}
}
}
......
......@@ -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));
}
......
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