Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // LiveEdit feature implementation. The script should be executed after | 5 // LiveEdit feature implementation. The script should be executed after |
| 6 // debug.js. | 6 // debug.js. |
| 7 | 7 |
| 8 // A LiveEdit namespace. It contains functions that modifies JavaScript code | 8 // A LiveEdit namespace. It contains functions that modifies JavaScript code |
| 9 // according to changes of script source (if possible). | 9 // according to changes of script source (if possible). |
| 10 // | 10 // |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 209 var position_patch_report = new GlobalArray(); | 209 var position_patch_report = new GlobalArray(); |
| 210 change_log.push( {position_patched: position_patch_report} ); | 210 change_log.push( {position_patched: position_patch_report} ); |
| 211 | 211 |
| 212 for (var i = 0; i < update_positions_list.length; i++) { | 212 for (var i = 0; i < update_positions_list.length; i++) { |
| 213 // TODO(LiveEdit): take into account whether it's source_changed or | 213 // TODO(LiveEdit): take into account whether it's source_changed or |
| 214 // unchanged and whether positions changed at all. | 214 // unchanged and whether positions changed at all. |
| 215 PatchPositions(update_positions_list[i], diff_array, | 215 PatchPositions(update_positions_list[i], diff_array, |
| 216 position_patch_report); | 216 position_patch_report); |
| 217 | 217 |
| 218 if (update_positions_list[i].live_shared_function_infos) { | 218 if (update_positions_list[i].live_shared_function_infos) { |
| 219 update_positions_list[i].live_shared_function_infos. | 219 for (var j = 0; j < update_positions_list[i].live_shared_function_infos. length; j++) { |
|
Camillo Bruni
2015/09/08 07:10:34
Did you change this on purpose? Seems unrelated to
aperez
2015/09/09 12:48:43
Now that I am changing the code to use a macro I c
| |
| 220 forEach(function (info) { | 220 var info = update_positions_list[i].live_shared_function_infos[j]; |
| 221 %LiveEditFunctionSourceUpdated(info.raw_array); | 221 %LiveEditFunctionSourceUpdated(info.raw_array); |
| 222 }); | 222 } |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 | 225 |
| 226 break_points_restorer(pos_translator, old_script); | 226 break_points_restorer(pos_translator, old_script); |
| 227 | 227 |
| 228 preview_description.updated = true; | 228 preview_description.updated = true; |
| 229 return preview_description; | 229 return preview_description; |
| 230 } | 230 } |
| 231 | 231 |
| 232 // Fully compiles source string as a script. Returns Array of | 232 // Fully compiles source string as a script. Returns Array of |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1114 | 1114 |
| 1115 LiveEdit.TestApi = { | 1115 LiveEdit.TestApi = { |
| 1116 PosTranslator: PosTranslator, | 1116 PosTranslator: PosTranslator, |
| 1117 CompareStrings: CompareStrings, | 1117 CompareStrings: CompareStrings, |
| 1118 ApplySingleChunkPatch: ApplySingleChunkPatch | 1118 ApplySingleChunkPatch: ApplySingleChunkPatch |
| 1119 }; | 1119 }; |
| 1120 | 1120 |
| 1121 global.Debug.LiveEdit = LiveEdit; | 1121 global.Debug.LiveEdit = LiveEdit; |
| 1122 | 1122 |
| 1123 }) | 1123 }) |
| OLD | NEW |