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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 if (params.callFrames[0].location.scriptId == this.thisScriptId) return; | 296 if (params.callFrames[0].location.scriptId == this.thisScriptId) return; |
297 | 297 |
298 // TODO(jgruber): Arguments as needed. | 298 // TODO(jgruber): Arguments as needed. |
299 let execState = { frames : params.callFrames, | 299 let execState = { frames : params.callFrames, |
300 prepareStep : this.execStatePrepareStep.bind(this), | 300 prepareStep : this.execStatePrepareStep.bind(this), |
301 frame : (index) => this.execStateFrame( | 301 frame : (index) => this.execStateFrame( |
302 index ? params.callFrames[index] | 302 index ? params.callFrames[index] |
303 : params.callFrames[0]), | 303 : params.callFrames[0]), |
304 frameCount : () => params.callFrames.length | 304 frameCount : () => params.callFrames.length |
305 }; | 305 }; |
| 306 |
306 let eventData = this.execStateFrame(params.callFrames[0]); | 307 let eventData = this.execStateFrame(params.callFrames[0]); |
| 308 if (debugEvent == this.DebugEvent.Exception) { |
| 309 eventData.uncaught = () => params.data.uncaught; |
| 310 } |
| 311 |
307 this.invokeListener(debugEvent, execState, eventData); | 312 this.invokeListener(debugEvent, execState, eventData); |
308 } | 313 } |
309 | 314 |
310 handleDebuggerScriptParsed(message) { | 315 handleDebuggerScriptParsed(message) { |
311 const params = message.params; | 316 const params = message.params; |
312 let eventData = { scriptId : params.scriptId, | 317 let eventData = { scriptId : params.scriptId, |
313 eventType : this.DebugEvent.AfterCompile | 318 eventType : this.DebugEvent.AfterCompile |
314 } | 319 } |
315 | 320 |
316 // TODO(jgruber): Arguments as needed. Still completely missing exec_state, | 321 // TODO(jgruber): Arguments as needed. Still completely missing exec_state, |
(...skipping 17 matching lines...) Expand all Loading... |
334 debug.instance = new DebugWrapper(); | 339 debug.instance = new DebugWrapper(); |
335 debug.instance.enable(); | 340 debug.instance.enable(); |
336 } | 341 } |
337 return debug.instance; | 342 return debug.instance; |
338 }}); | 343 }}); |
339 | 344 |
340 Object.defineProperty(debug, 'ScopeType', { get: function() { | 345 Object.defineProperty(debug, 'ScopeType', { get: function() { |
341 const instance = debug.Debug; | 346 const instance = debug.Debug; |
342 return instance.ScopeType; | 347 return instance.ScopeType; |
343 }}); | 348 }}); |
OLD | NEW |