| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 WebInspector.moduleSetting("pauseOnExceptionEnabled").addChangeListener(this
._pauseOnExceptionStateChanged, this); | 55 WebInspector.moduleSetting("pauseOnExceptionEnabled").addChangeListener(this
._pauseOnExceptionStateChanged, this); |
| 56 WebInspector.moduleSetting("pauseOnCaughtException").addChangeListener(this.
_pauseOnExceptionStateChanged, this); | 56 WebInspector.moduleSetting("pauseOnCaughtException").addChangeListener(this.
_pauseOnExceptionStateChanged, this); |
| 57 WebInspector.moduleSetting("enableAsyncStackTraces").addChangeListener(this.
asyncStackTracesStateChanged, this); | 57 WebInspector.moduleSetting("enableAsyncStackTraces").addChangeListener(this.
asyncStackTracesStateChanged, this); |
| 58 | 58 |
| 59 this.enableDebugger(); | 59 this.enableDebugger(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 /** @typedef {{location: ?WebInspector.DebuggerModel.Location, sourceURL: ?strin
g, functionName: string, scopeChain: (Array.<!DebuggerAgent.Scope>|null)}} */ | 62 /** @typedef {{location: ?WebInspector.DebuggerModel.Location, sourceURL: ?strin
g, functionName: string, scopeChain: (Array.<!DebuggerAgent.Scope>|null)}} */ |
| 63 WebInspector.DebuggerModel.FunctionDetails; | 63 WebInspector.DebuggerModel.FunctionDetails; |
| 64 | 64 |
| 65 /** @typedef {{location: ?WebInspector.DebuggerModel.Location, sourceURL: ?strin
g, functionName: string, status: string}} */ | |
| 66 WebInspector.DebuggerModel.GeneratorObjectDetails; | |
| 67 | |
| 68 /** | 65 /** |
| 69 * Keep these in sync with WebCore::V8Debugger | 66 * Keep these in sync with WebCore::V8Debugger |
| 70 * | 67 * |
| 71 * @enum {string} | 68 * @enum {string} |
| 72 */ | 69 */ |
| 73 WebInspector.DebuggerModel.PauseOnExceptionsState = { | 70 WebInspector.DebuggerModel.PauseOnExceptionsState = { |
| 74 DontPauseOnExceptions : "none", | 71 DontPauseOnExceptions : "none", |
| 75 PauseOnAllExceptions : "all", | 72 PauseOnAllExceptions : "all", |
| 76 PauseOnUncaughtExceptions: "uncaught" | 73 PauseOnUncaughtExceptions: "uncaught" |
| 77 }; | 74 }; |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 if (callback) | 707 if (callback) |
| 711 callback(error); | 708 callback(error); |
| 712 return; | 709 return; |
| 713 } | 710 } |
| 714 if (callback) | 711 if (callback) |
| 715 callback(); | 712 callback(); |
| 716 } | 713 } |
| 717 }, | 714 }, |
| 718 | 715 |
| 719 /** | 716 /** |
| 720 * @param {!WebInspector.RemoteObject} remoteObject | |
| 721 * @param {function(?WebInspector.DebuggerModel.GeneratorObjectDetails)} cal
lback | |
| 722 */ | |
| 723 generatorObjectDetails: function(remoteObject, callback) | |
| 724 { | |
| 725 this._agent.getGeneratorObjectDetails(remoteObject.objectId, didGetDetai
ls.bind(this)); | |
| 726 | |
| 727 /** | |
| 728 * @param {?Protocol.Error} error | |
| 729 * @param {!DebuggerAgent.GeneratorObjectDetails} response | |
| 730 * @this {WebInspector.DebuggerModel} | |
| 731 */ | |
| 732 function didGetDetails(error, response) | |
| 733 { | |
| 734 if (error) { | |
| 735 console.error(error); | |
| 736 callback(null); | |
| 737 return; | |
| 738 } | |
| 739 var location = response.location; | |
| 740 var script = location && this.scriptForId(location.scriptId); | |
| 741 var rawLocation = script ? this.createRawLocation(script, location.l
ineNumber, location.columnNumber || 0) : null; | |
| 742 var sourceURL = script ? script.contentURL() : null; | |
| 743 callback({location: rawLocation, sourceURL: sourceURL, functionName:
response.functionName, status: response.status}); | |
| 744 } | |
| 745 }, | |
| 746 | |
| 747 /** | |
| 748 * @param {!DebuggerAgent.BreakpointId} breakpointId | 717 * @param {!DebuggerAgent.BreakpointId} breakpointId |
| 749 * @param {function(!WebInspector.Event)} listener | 718 * @param {function(!WebInspector.Event)} listener |
| 750 * @param {!Object=} thisObject | 719 * @param {!Object=} thisObject |
| 751 */ | 720 */ |
| 752 addBreakpointListener: function(breakpointId, listener, thisObject) | 721 addBreakpointListener: function(breakpointId, listener, thisObject) |
| 753 { | 722 { |
| 754 this._breakpointResolvedEventTarget.addEventListener(breakpointId, liste
ner, thisObject) | 723 this._breakpointResolvedEventTarget.addEventListener(breakpointId, liste
ner, thisObject) |
| 755 }, | 724 }, |
| 756 | 725 |
| 757 /** | 726 /** |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 /** | 1291 /** |
| 1323 * @param {?WebInspector.Target} target | 1292 * @param {?WebInspector.Target} target |
| 1324 * @return {?WebInspector.DebuggerModel} | 1293 * @return {?WebInspector.DebuggerModel} |
| 1325 */ | 1294 */ |
| 1326 WebInspector.DebuggerModel.fromTarget = function(target) | 1295 WebInspector.DebuggerModel.fromTarget = function(target) |
| 1327 { | 1296 { |
| 1328 if (!target || !target.hasJSContext()) | 1297 if (!target || !target.hasJSContext()) |
| 1329 return null; | 1298 return null; |
| 1330 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); | 1299 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); |
| 1331 } | 1300 } |
| OLD | NEW |