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

Unified Diff: src/runtime.cc

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-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 9199290a9113db7404884d7d5e3d950de0ecf7aa..9190cec7611a85a1359675e432c4d8ab6c27cba7 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -9656,6 +9656,8 @@ static Object* Runtime_LiveEditReplaceScript(Arguments args) {
old_script->set_eval_from_instructions_offset(
original_script->eval_from_instructions_offset());
+ // Drop line ends so that they will be recalculated.
+ original_script->set_line_ends(Heap::undefined_value());
Debugger::OnAfterCompile(old_script, Debugger::SEND_WHEN_DEBUGGING);
@@ -9692,15 +9694,18 @@ static Object* Runtime_LiveEditRelinkFunctionToScript(Arguments args) {
// array of groups of 3 numbers:
// (change_begin, change_end, change_end_new_position).
// Each group describes a change in text; groups are sorted by change_begin.
+// Returns an array of pairs (new source position, breakpoint_object/array)
+// so that JS side could update positions in breakpoint objects.
static Object* Runtime_LiveEditPatchFunctionPositions(Arguments args) {
ASSERT(args.length() == 2);
HandleScope scope;
CONVERT_ARG_CHECKED(JSArray, shared_array, 0);
CONVERT_ARG_CHECKED(JSArray, position_change_array, 1);
- LiveEdit::PatchFunctionPositions(shared_array, position_change_array);
+ Handle<Object> result =
+ LiveEdit::PatchFunctionPositions(shared_array, position_change_array);
- return Heap::undefined_value();
+ return *result;
}
« no previous file with comments | « src/liveedit-debugger.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698