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

Unified Diff: src/liveedit-debugger.js

Issue 1090003: LiveEdit: update breakpoint positions for non-changed functions (Closed)
Patch Set: follow codereview Created 10 years, 8 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/liveedit.cc ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liveedit-debugger.js
diff --git a/src/liveedit-debugger.js b/src/liveedit-debugger.js
index 75effb227ff933cff1373f8c2c7e4ea36cff5102..6ef7a2daed67d95b89a448695e01def62f249fad 100644
--- a/src/liveedit-debugger.js
+++ b/src/liveedit-debugger.js
@@ -180,11 +180,18 @@ Debug.LiveEditChangeScript = function(script, change_pos, change_len, new_str,
var position_patch_report;
function PatchPositions(new_info, shared_info) {
if (!shared_info) {
- // TODO: explain what is happening.
+ // TODO(LiveEdit): explain what is happening.
return;
}
- %LiveEditPatchFunctionPositions(shared_info.raw_array,
- position_change_array);
+ var breakpoint_position_update = %LiveEditPatchFunctionPositions(
+ shared_info.raw_array, position_change_array);
+ for (var i = 0; i < breakpoint_position_update.length; i += 2) {
+ var new_pos = breakpoint_position_update[i];
+ var break_point_object = breakpoint_position_update[i + 1];
+ change_log.push( { breakpoint_position_update:
+ { from: break_point_object.source_position(), to: new_pos } } );
+ break_point_object.updateSourcePosition(new_pos, script);
+ }
position_patch_report.push( { name: new_info.function_name } );
}
« no previous file with comments | « src/liveedit.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698