Index: src/debug/liveedit.js |
diff --git a/src/debug/liveedit.js b/src/debug/liveedit.js |
index e9ee8092a269900dab3a505f8e793579dcbbca6b..4e2420e9064b089f8f6868a8beafeccf2e1d09eb 100644 |
--- a/src/debug/liveedit.js |
+++ b/src/debug/liveedit.js |
@@ -30,6 +30,7 @@ |
var GetScriptBreakPoints; |
var GlobalArray = global.Array; |
var MathFloor = global.Math.floor; |
+ var MathMax = global.Math.max; |
var SyntaxError = global.SyntaxError; |
utils.Import(function(from) { |
@@ -80,6 +81,10 @@ |
} |
throw failure; |
} |
+ |
+ var max_function_literal_id = |
+ MathMax.apply(null, new_compile_info.map(i => i.function_literal_id)); |
jochen (gone - plz use gerrit)
2016/12/01 10:30:56
https://bugs.chromium.org/p/v8/issues/detail?id=57
|
+ |
var root_new_node = BuildCodeInfoTree(new_compile_info); |
// Link recompiled script data with other data. |
@@ -179,15 +184,15 @@ |
// Create an old script only if there are function that should be linked |
// to old version. |
if (link_to_old_script_list.length == 0) { |
- %LiveEditReplaceScript(script, new_source, null); |
+ %LiveEditReplaceScript(script, max_function_literal_id, new_source, null); |
old_script = UNDEFINED; |
} else { |
var old_script_name = CreateNameForOldScript(script); |
// Update the script text and create a new script representing an old |
// version of the script. |
- old_script = %LiveEditReplaceScript(script, new_source, |
- old_script_name); |
+ old_script = %LiveEditReplaceScript(script, max_function_literal_id, |
+ new_source, old_script_name); |
var link_to_old_script_report = new GlobalArray(); |
change_log.push( { linked_to_old_script: link_to_old_script_report } ); |
@@ -845,6 +850,7 @@ |
this.scope_info = raw_array[4]; |
this.outer_index = raw_array[5]; |
this.shared_function_info = raw_array[6]; |
+ this.function_literal_id = raw_array[8]; |
this.next_sibling_index = null; |
this.raw_array = raw_array; |
} |