OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 break_point.clear(); | 374 break_point.clear(); |
375 | 375 |
376 // TODO(LiveEdit): be careful with resource offset here. | 376 // TODO(LiveEdit): be careful with resource offset here. |
377 var break_point_position = Debug.findScriptSourcePosition(original_script, | 377 var break_point_position = Debug.findScriptSourcePosition(original_script, |
378 break_point.line(), break_point.column()); | 378 break_point.line(), break_point.column()); |
379 | 379 |
380 var old_position_description = { | 380 var old_position_description = { |
381 position: break_point_position, | 381 position: break_point_position, |
382 line: break_point.line(), | 382 line: break_point.line(), |
383 column: break_point.column() | 383 column: break_point.column() |
384 } | 384 }; |
385 break_point_old_positions.push(old_position_description); | 385 break_point_old_positions.push(old_position_description); |
386 } | 386 } |
387 | 387 |
388 | 388 |
389 // Restores breakpoints and creates their copies in the "old" copy of | 389 // Restores breakpoints and creates their copies in the "old" copy of |
390 // the script. | 390 // the script. |
391 return function (pos_translator, old_script_copy_opt) { | 391 return function (pos_translator, old_script_copy_opt) { |
392 // Update breakpoints (change positions and restore them in old version | 392 // Update breakpoints (change positions and restore them in old version |
393 // of script. | 393 // of script. |
394 for (var i = 0; i < script_break_points.length; i++) { | 394 for (var i = 0; i < script_break_points.length; i++) { |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 // A copy of the FunctionPatchabilityStatus enum from liveedit.h | 942 // A copy of the FunctionPatchabilityStatus enum from liveedit.h |
943 var FunctionPatchabilityStatus = { | 943 var FunctionPatchabilityStatus = { |
944 AVAILABLE_FOR_PATCH: 1, | 944 AVAILABLE_FOR_PATCH: 1, |
945 BLOCKED_ON_ACTIVE_STACK: 2, | 945 BLOCKED_ON_ACTIVE_STACK: 2, |
946 BLOCKED_ON_OTHER_STACK: 3, | 946 BLOCKED_ON_OTHER_STACK: 3, |
947 BLOCKED_UNDER_NATIVE_CODE: 4, | 947 BLOCKED_UNDER_NATIVE_CODE: 4, |
948 REPLACED_ON_ACTIVE_STACK: 5 | 948 REPLACED_ON_ACTIVE_STACK: 5 |
949 } | 949 } |
950 | 950 |
951 FunctionPatchabilityStatus.SymbolName = function(code) { | 951 FunctionPatchabilityStatus.SymbolName = function(code) { |
952 var enum = FunctionPatchabilityStatus; | 952 var enumeration = FunctionPatchabilityStatus; |
953 for (name in enum) { | 953 for (name in enumeration) { |
954 if (enum[name] == code) { | 954 if (enumeration[name] == code) { |
955 return name; | 955 return name; |
956 } | 956 } |
957 } | 957 } |
958 } | 958 } |
959 | 959 |
960 | 960 |
961 // A logical failure in liveedit process. This means that change_log | 961 // A logical failure in liveedit process. This means that change_log |
962 // is valid and consistent description of what happened. | 962 // is valid and consistent description of what happened. |
963 function Failure(message) { | 963 function Failure(message) { |
964 this.message = message; | 964 this.message = message; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 } | 1073 } |
1074 | 1074 |
1075 | 1075 |
1076 // Functions are public for tests. | 1076 // Functions are public for tests. |
1077 this.TestApi = { | 1077 this.TestApi = { |
1078 PosTranslator: PosTranslator, | 1078 PosTranslator: PosTranslator, |
1079 CompareStrings: CompareStrings, | 1079 CompareStrings: CompareStrings, |
1080 ApplySingleChunkPatch: ApplySingleChunkPatch | 1080 ApplySingleChunkPatch: ApplySingleChunkPatch |
1081 } | 1081 } |
1082 } | 1082 } |
OLD | NEW |