OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 "use strict"; | 5 "use strict"; |
6 | 6 |
7 // If true, prints all messages sent and received by inspector. | 7 // If true, prints all messages sent and received by inspector. |
8 const printProtocolMessages = false; | 8 const printProtocolMessages = false; |
9 | 9 |
10 // The active wrapper instance. | 10 // The active wrapper instance. |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 case "exception": | 812 case "exception": |
813 case "promiseRejection": | 813 case "promiseRejection": |
814 debugEvent = this.DebugEvent.Exception; | 814 debugEvent = this.DebugEvent.Exception; |
815 break; | 815 break; |
816 default: | 816 default: |
817 // TODO(jgruber): More granularity. | 817 // TODO(jgruber): More granularity. |
818 debugEvent = this.DebugEvent.Break; | 818 debugEvent = this.DebugEvent.Break; |
819 break; | 819 break; |
820 } | 820 } |
821 | 821 |
822 if (!params.callFrames[0]) return; | |
823 | |
824 // Skip break events in this file. | 822 // Skip break events in this file. |
825 if (params.callFrames[0].location.scriptId == this.thisScriptId) return; | 823 if (params.callFrames[0].location.scriptId == this.thisScriptId) return; |
826 | 824 |
827 // TODO(jgruber): Arguments as needed. | 825 // TODO(jgruber): Arguments as needed. |
828 let execState = { frames : params.callFrames, | 826 let execState = { frames : params.callFrames, |
829 prepareStep : this.execStatePrepareStep.bind(this), | 827 prepareStep : this.execStatePrepareStep.bind(this), |
830 evaluateGlobal : | 828 evaluateGlobal : |
831 (expr) => this.execStateEvaluateGlobal(expr), | 829 (expr) => this.execStateEvaluateGlobal(expr), |
832 frame : (index) => this.execStateFrame( | 830 frame : (index) => this.execStateFrame( |
833 index ? params.callFrames[index] | 831 index ? params.callFrames[index] |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 debug.instance = new DebugWrapper(); | 883 debug.instance = new DebugWrapper(); |
886 debug.instance.enable(); | 884 debug.instance.enable(); |
887 } | 885 } |
888 return debug.instance; | 886 return debug.instance; |
889 }}); | 887 }}); |
890 | 888 |
891 Object.defineProperty(debug, 'ScopeType', { get: function() { | 889 Object.defineProperty(debug, 'ScopeType', { get: function() { |
892 const instance = debug.Debug; | 890 const instance = debug.Debug; |
893 return instance.ScopeType; | 891 return instance.ScopeType; |
894 }}); | 892 }}); |
OLD | NEW |