| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 CompileError: 4, | 44 CompileError: 4, |
| 45 AsyncTaskEvent: 5 }; | 45 AsyncTaskEvent: 5 }; |
| 46 | 46 |
| 47 // Types of exceptions that can be broken upon. | 47 // Types of exceptions that can be broken upon. |
| 48 Debug.ExceptionBreak = { Caught : 0, | 48 Debug.ExceptionBreak = { Caught : 0, |
| 49 Uncaught: 1 }; | 49 Uncaught: 1 }; |
| 50 | 50 |
| 51 // The different types of steps. | 51 // The different types of steps. |
| 52 Debug.StepAction = { StepOut: 0, | 52 Debug.StepAction = { StepOut: 0, |
| 53 StepNext: 1, | 53 StepNext: 1, |
| 54 StepIn: 2, | 54 StepIn: 2 }; |
| 55 StepFrame: 3 }; | |
| 56 | 55 |
| 57 // The different types of scripts matching enum ScriptType in objects.h. | 56 // The different types of scripts matching enum ScriptType in objects.h. |
| 58 Debug.ScriptType = { Native: 0, | 57 Debug.ScriptType = { Native: 0, |
| 59 Extension: 1, | 58 Extension: 1, |
| 60 Normal: 2, | 59 Normal: 2, |
| 61 Wasm: 3}; | 60 Wasm: 3}; |
| 62 | 61 |
| 63 // The different types of script compilations matching enum | 62 // The different types of script compilations matching enum |
| 64 // Script::CompilationType in objects.h. | 63 // Script::CompilationType in objects.h. |
| 65 Debug.ScriptCompilationType = { Host: 0, | 64 Debug.ScriptCompilationType = { Host: 0, |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 } | 820 } |
| 822 | 821 |
| 823 function ExecutionState(break_id) { | 822 function ExecutionState(break_id) { |
| 824 this.break_id = break_id; | 823 this.break_id = break_id; |
| 825 this.selected_frame = 0; | 824 this.selected_frame = 0; |
| 826 } | 825 } |
| 827 | 826 |
| 828 ExecutionState.prototype.prepareStep = function(action) { | 827 ExecutionState.prototype.prepareStep = function(action) { |
| 829 if (action === Debug.StepAction.StepIn || | 828 if (action === Debug.StepAction.StepIn || |
| 830 action === Debug.StepAction.StepOut || | 829 action === Debug.StepAction.StepOut || |
| 831 action === Debug.StepAction.StepNext || | 830 action === Debug.StepAction.StepNext) { |
| 832 action === Debug.StepAction.StepFrame) { | |
| 833 return %PrepareStep(this.break_id, action); | 831 return %PrepareStep(this.break_id, action); |
| 834 } | 832 } |
| 835 throw %make_type_error(kDebuggerType); | 833 throw %make_type_error(kDebuggerType); |
| 836 }; | 834 }; |
| 837 | 835 |
| 838 ExecutionState.prototype.evaluateGlobal = function(source) { | 836 ExecutionState.prototype.evaluateGlobal = function(source) { |
| 839 return MakeMirror(%DebugEvaluateGlobal(this.break_id, source)); | 837 return MakeMirror(%DebugEvaluateGlobal(this.break_id, source)); |
| 840 }; | 838 }; |
| 841 | 839 |
| 842 ExecutionState.prototype.frameCount = function() { | 840 ExecutionState.prototype.frameCount = function() { |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 utils.InstallFunctions(utils, DONT_ENUM, [ | 1028 utils.InstallFunctions(utils, DONT_ENUM, [ |
| 1031 "MakeExecutionState", MakeExecutionState, | 1029 "MakeExecutionState", MakeExecutionState, |
| 1032 "MakeExceptionEvent", MakeExceptionEvent, | 1030 "MakeExceptionEvent", MakeExceptionEvent, |
| 1033 "MakeBreakEvent", MakeBreakEvent, | 1031 "MakeBreakEvent", MakeBreakEvent, |
| 1034 "MakeCompileEvent", MakeCompileEvent, | 1032 "MakeCompileEvent", MakeCompileEvent, |
| 1035 "MakeAsyncTaskEvent", MakeAsyncTaskEvent, | 1033 "MakeAsyncTaskEvent", MakeAsyncTaskEvent, |
| 1036 "IsBreakPointTriggered", IsBreakPointTriggered, | 1034 "IsBreakPointTriggered", IsBreakPointTriggered, |
| 1037 ]); | 1035 ]); |
| 1038 | 1036 |
| 1039 }) | 1037 }) |
| OLD | NEW |