| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 WebInspector.moduleSetting("pauseOnExceptionEnabled").addChangeListener(this
._pauseOnExceptionStateChanged, this); | 54 WebInspector.moduleSetting("pauseOnExceptionEnabled").addChangeListener(this
._pauseOnExceptionStateChanged, this); |
| 55 WebInspector.moduleSetting("pauseOnCaughtException").addChangeListener(this.
_pauseOnExceptionStateChanged, this); | 55 WebInspector.moduleSetting("pauseOnCaughtException").addChangeListener(this.
_pauseOnExceptionStateChanged, this); |
| 56 WebInspector.moduleSetting("enableAsyncStackTraces").addChangeListener(this.
asyncStackTracesStateChanged, this); | 56 WebInspector.moduleSetting("enableAsyncStackTraces").addChangeListener(this.
asyncStackTracesStateChanged, this); |
| 57 | 57 |
| 58 this.enableDebugger(); | 58 this.enableDebugger(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 /** @typedef {{location: ?WebInspector.DebuggerModel.Location, sourceURL: ?strin
g, functionName: string, scopeChain: (Array.<!DebuggerAgent.Scope>|null)}} */ | 61 /** @typedef {{location: ?WebInspector.DebuggerModel.Location, sourceURL: ?strin
g, functionName: string, scopeChain: (Array.<!DebuggerAgent.Scope>|null)}} */ |
| 62 WebInspector.DebuggerModel.FunctionDetails; | 62 WebInspector.DebuggerModel.FunctionDetails; |
| 63 | 63 |
| 64 /** @typedef {{location: ?WebInspector.DebuggerModel.Location, sourceURL: ?strin
g, functionName: string, status: string}} */ | |
| 65 WebInspector.DebuggerModel.GeneratorObjectDetails; | |
| 66 | |
| 67 /** | 64 /** |
| 68 * Keep these in sync with WebCore::V8Debugger | 65 * Keep these in sync with WebCore::V8Debugger |
| 69 * | 66 * |
| 70 * @enum {string} | 67 * @enum {string} |
| 71 */ | 68 */ |
| 72 WebInspector.DebuggerModel.PauseOnExceptionsState = { | 69 WebInspector.DebuggerModel.PauseOnExceptionsState = { |
| 73 DontPauseOnExceptions : "none", | 70 DontPauseOnExceptions : "none", |
| 74 PauseOnAllExceptions : "all", | 71 PauseOnAllExceptions : "all", |
| 75 PauseOnUncaughtExceptions: "uncaught" | 72 PauseOnUncaughtExceptions: "uncaught" |
| 76 }; | 73 }; |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 if (callback) | 706 if (callback) |
| 710 callback(error); | 707 callback(error); |
| 711 return; | 708 return; |
| 712 } | 709 } |
| 713 if (callback) | 710 if (callback) |
| 714 callback(); | 711 callback(); |
| 715 } | 712 } |
| 716 }, | 713 }, |
| 717 | 714 |
| 718 /** | 715 /** |
| 719 * @param {!WebInspector.RemoteObject} remoteObject | |
| 720 * @param {function(?WebInspector.DebuggerModel.GeneratorObjectDetails)} cal
lback | |
| 721 */ | |
| 722 generatorObjectDetails: function(remoteObject, callback) | |
| 723 { | |
| 724 this._agent.getGeneratorObjectDetails(remoteObject.objectId, didGetDetai
ls.bind(this)); | |
| 725 | |
| 726 /** | |
| 727 * @param {?Protocol.Error} error | |
| 728 * @param {!DebuggerAgent.GeneratorObjectDetails} response | |
| 729 * @this {WebInspector.DebuggerModel} | |
| 730 */ | |
| 731 function didGetDetails(error, response) | |
| 732 { | |
| 733 if (error) { | |
| 734 console.error(error); | |
| 735 callback(null); | |
| 736 return; | |
| 737 } | |
| 738 var location = response.location; | |
| 739 var script = location && this.scriptForId(location.scriptId); | |
| 740 var rawLocation = script ? this.createRawLocation(script, location.l
ineNumber, location.columnNumber || 0) : null; | |
| 741 var sourceURL = script ? script.contentURL() : null; | |
| 742 callback({location: rawLocation, sourceURL: sourceURL, functionName:
response.functionName, status: response.status}); | |
| 743 } | |
| 744 }, | |
| 745 | |
| 746 /** | |
| 747 * @param {!DebuggerAgent.BreakpointId} breakpointId | 716 * @param {!DebuggerAgent.BreakpointId} breakpointId |
| 748 * @param {function(!WebInspector.Event)} listener | 717 * @param {function(!WebInspector.Event)} listener |
| 749 * @param {!Object=} thisObject | 718 * @param {!Object=} thisObject |
| 750 */ | 719 */ |
| 751 addBreakpointListener: function(breakpointId, listener, thisObject) | 720 addBreakpointListener: function(breakpointId, listener, thisObject) |
| 752 { | 721 { |
| 753 this._breakpointResolvedEventTarget.addEventListener(breakpointId, liste
ner, thisObject) | 722 this._breakpointResolvedEventTarget.addEventListener(breakpointId, liste
ner, thisObject) |
| 754 }, | 723 }, |
| 755 | 724 |
| 756 /** | 725 /** |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 /** | 1284 /** |
| 1316 * @param {?WebInspector.Target} target | 1285 * @param {?WebInspector.Target} target |
| 1317 * @return {?WebInspector.DebuggerModel} | 1286 * @return {?WebInspector.DebuggerModel} |
| 1318 */ | 1287 */ |
| 1319 WebInspector.DebuggerModel.fromTarget = function(target) | 1288 WebInspector.DebuggerModel.fromTarget = function(target) |
| 1320 { | 1289 { |
| 1321 if (!target || !target.hasJSContext()) | 1290 if (!target || !target.hasJSContext()) |
| 1322 return null; | 1291 return null; |
| 1323 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); | 1292 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); |
| 1324 } | 1293 } |
| OLD | NEW |