| 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 21 matching lines...) Expand all Loading... |
| 32 * @constructor | 32 * @constructor |
| 33 * @extends {WebInspector.SDKModel} | 33 * @extends {WebInspector.SDKModel} |
| 34 * @param {!WebInspector.Target} target | 34 * @param {!WebInspector.Target} target |
| 35 */ | 35 */ |
| 36 WebInspector.DebuggerModel = function(target) | 36 WebInspector.DebuggerModel = function(target) |
| 37 { | 37 { |
| 38 WebInspector.SDKModel.call(this, WebInspector.DebuggerModel, target); | 38 WebInspector.SDKModel.call(this, WebInspector.DebuggerModel, target); |
| 39 | 39 |
| 40 target.registerDebuggerDispatcher(new WebInspector.DebuggerDispatcher(this))
; | 40 target.registerDebuggerDispatcher(new WebInspector.DebuggerDispatcher(this))
; |
| 41 this._agent = target.debuggerAgent(); | 41 this._agent = target.debuggerAgent(); |
| 42 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event
s.TargetDisposed, this._targetDisposed, this); | |
| 43 | 42 |
| 44 /** @type {?WebInspector.DebuggerPausedDetails} */ | 43 /** @type {?WebInspector.DebuggerPausedDetails} */ |
| 45 this._debuggerPausedDetails = null; | 44 this._debuggerPausedDetails = null; |
| 46 /** @type {!Object.<string, !WebInspector.Script>} */ | 45 /** @type {!Object.<string, !WebInspector.Script>} */ |
| 47 this._scripts = {}; | 46 this._scripts = {}; |
| 48 /** @type {!Map.<string, !Array.<!WebInspector.Script>>} */ | 47 /** @type {!Map.<string, !Array.<!WebInspector.Script>>} */ |
| 49 this._scriptsBySourceURL = new Map(); | 48 this._scriptsBySourceURL = new Map(); |
| 50 | 49 |
| 51 /** @type {!WebInspector.Object} */ | 50 /** @type {!WebInspector.Object} */ |
| 52 this._breakpointResolvedEventTarget = new WebInspector.Object(); | 51 this._breakpointResolvedEventTarget = new WebInspector.Object(); |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 * @param {?Protocol.Error} error | 778 * @param {?Protocol.Error} error |
| 780 */ | 779 */ |
| 781 function patternsUpdated(error) | 780 function patternsUpdated(error) |
| 782 { | 781 { |
| 783 if (error) | 782 if (error) |
| 784 console.error(error); | 783 console.error(error); |
| 785 callback(!error); | 784 callback(!error); |
| 786 } | 785 } |
| 787 }, | 786 }, |
| 788 | 787 |
| 789 /** | 788 dispose: function() |
| 790 * @param {!WebInspector.Event} event | |
| 791 */ | |
| 792 _targetDisposed: function(event) | |
| 793 { | 789 { |
| 794 var target = /** @type {!WebInspector.Target} */ (event.data); | |
| 795 if (target !== this.target()) | |
| 796 return; | |
| 797 WebInspector.moduleSetting("pauseOnExceptionEnabled").removeChangeListen
er(this._pauseOnExceptionStateChanged, this); | 790 WebInspector.moduleSetting("pauseOnExceptionEnabled").removeChangeListen
er(this._pauseOnExceptionStateChanged, this); |
| 798 WebInspector.moduleSetting("pauseOnCaughtException").removeChangeListene
r(this._pauseOnExceptionStateChanged, this); | 791 WebInspector.moduleSetting("pauseOnCaughtException").removeChangeListene
r(this._pauseOnExceptionStateChanged, this); |
| 799 WebInspector.moduleSetting("enableAsyncStackTraces").removeChangeListene
r(this.asyncStackTracesStateChanged, this); | 792 WebInspector.moduleSetting("enableAsyncStackTraces").removeChangeListene
r(this.asyncStackTracesStateChanged, this); |
| 800 }, | 793 }, |
| 801 | 794 |
| 802 /** | 795 /** |
| 803 * @override | 796 * @override |
| 804 * @return {!Promise} | 797 * @return {!Promise} |
| 805 */ | 798 */ |
| 806 suspendModel: function() | 799 suspendModel: function() |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 /** | 1315 /** |
| 1323 * @param {?WebInspector.Target} target | 1316 * @param {?WebInspector.Target} target |
| 1324 * @return {?WebInspector.DebuggerModel} | 1317 * @return {?WebInspector.DebuggerModel} |
| 1325 */ | 1318 */ |
| 1326 WebInspector.DebuggerModel.fromTarget = function(target) | 1319 WebInspector.DebuggerModel.fromTarget = function(target) |
| 1327 { | 1320 { |
| 1328 if (!target || !target.hasJSContext()) | 1321 if (!target || !target.hasJSContext()) |
| 1329 return null; | 1322 return null; |
| 1330 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); | 1323 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector
.DebuggerModel)); |
| 1331 } | 1324 } |
| OLD | NEW |