Chromium Code Reviews| Index: src/mirror-debugger.js |
| diff --git a/src/mirror-debugger.js b/src/mirror-debugger.js |
| index e1fd872f3b980f0224bb3b1741989ea3dcea2718..9c39414a22d3a1c6ba017a1d58c5f5fdceb8d83f 100644 |
| --- a/src/mirror-debugger.js |
| +++ b/src/mirror-debugger.js |
| @@ -1671,13 +1671,28 @@ FrameMirror.prototype.scope = function(index) { |
| FrameMirror.prototype.evaluate = function(source, disable_break, |
| opt_context_object) { |
| - var result = %DebugEvaluate(this.break_id_, |
| - this.details_.frameId(), |
| - this.details_.inlinedFrameIndex(), |
| - source, |
| - Boolean(disable_break), |
| - opt_context_object); |
| - return MakeMirror(result); |
| + var result_array = %DebugEvaluate(this.break_id_, |
| + this.details_.frameId(), |
|
Yang
2013/06/25 11:15:01
indentation is off by one.
Peter Rybin
2013/06/25 12:22:41
Done.
|
| + this.details_.inlinedFrameIndex(), |
| + source, |
| + Boolean(disable_break), |
| + opt_context_object); |
| + // TODO: Check against optimized function somehow. |
| + 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) { |
| + %SetScopeVariableValue(this.break_id_, |
| + this.details_.frameId(), |
| + this.details_.inlinedFrameIndex(), |
| + 0, |
| + n, |
| + value_after); |
| + } |
| + } |
| + return MakeMirror(result_array[0]); |
| }; |