| 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 (function (global, utils) { | 5 (function (global, utils) { |
| 6 "use strict"; | 6 "use strict"; |
| 7 | 7 |
| 8 // ---------------------------------------------------------------------------- | 8 // ---------------------------------------------------------------------------- |
| 9 // Imports | 9 // Imports |
| 10 | 10 |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 | 936 |
| 937 function MakeExecutionState(break_id) { | 937 function MakeExecutionState(break_id) { |
| 938 return new ExecutionState(break_id); | 938 return new ExecutionState(break_id); |
| 939 } | 939 } |
| 940 | 940 |
| 941 function ExecutionState(break_id) { | 941 function ExecutionState(break_id) { |
| 942 this.break_id = break_id; | 942 this.break_id = break_id; |
| 943 this.selected_frame = 0; | 943 this.selected_frame = 0; |
| 944 } | 944 } |
| 945 | 945 |
| 946 ExecutionState.prototype.prepareStep = function(opt_action, opt_count, | 946 ExecutionState.prototype.prepareStep = function(opt_action, opt_count) { |
| 947 opt_callframe) { | |
| 948 var action = Debug.StepAction.StepIn; | 947 var action = Debug.StepAction.StepIn; |
| 949 if (!IS_UNDEFINED(opt_action)) action = TO_NUMBER(opt_action); | 948 if (!IS_UNDEFINED(opt_action)) action = TO_NUMBER(opt_action); |
| 950 var count = opt_count ? TO_NUMBER(opt_count) : 1; | 949 var count = opt_count ? TO_NUMBER(opt_count) : 1; |
| 951 var callFrameId = 0; | 950 return %PrepareStep(this.break_id, action, count); |
| 952 if (!IS_UNDEFINED(opt_callframe)) { | |
| 953 callFrameId = opt_callframe.details_.frameId(); | |
| 954 } | |
| 955 | |
| 956 return %PrepareStep(this.break_id, action, count, callFrameId); | |
| 957 }; | 951 }; |
| 958 | 952 |
| 959 ExecutionState.prototype.evaluateGlobal = function(source, disable_break, | 953 ExecutionState.prototype.evaluateGlobal = function(source, disable_break, |
| 960 opt_additional_context) { | 954 opt_additional_context) { |
| 961 return MakeMirror(%DebugEvaluateGlobal(this.break_id, source, | 955 return MakeMirror(%DebugEvaluateGlobal(this.break_id, source, |
| 962 TO_BOOLEAN(disable_break), | 956 TO_BOOLEAN(disable_break), |
| 963 opt_additional_context)); | 957 opt_additional_context)); |
| 964 }; | 958 }; |
| 965 | 959 |
| 966 ExecutionState.prototype.frameCount = function() { | 960 ExecutionState.prototype.frameCount = function() { |
| (...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2617 "IsBreakPointTriggered", IsBreakPointTriggered, | 2611 "IsBreakPointTriggered", IsBreakPointTriggered, |
| 2618 "UpdateScriptBreakPoints", UpdateScriptBreakPoints, | 2612 "UpdateScriptBreakPoints", UpdateScriptBreakPoints, |
| 2619 ]); | 2613 ]); |
| 2620 | 2614 |
| 2621 // Export to liveedit.js | 2615 // Export to liveedit.js |
| 2622 utils.Export(function(to) { | 2616 utils.Export(function(to) { |
| 2623 to.GetScriptBreakPoints = GetScriptBreakPoints; | 2617 to.GetScriptBreakPoints = GetScriptBreakPoints; |
| 2624 }); | 2618 }); |
| 2625 | 2619 |
| 2626 }) | 2620 }) |
| OLD | NEW |