| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 this._scriptsBySourceURL = new StringMap(); | 48 this._scriptsBySourceURL = new StringMap(); |
| 49 | 49 |
| 50 /** @type {!WebInspector.Object} */ | 50 /** @type {!WebInspector.Object} */ |
| 51 this._breakpointResolvedEventTarget = new WebInspector.Object(); | 51 this._breakpointResolvedEventTarget = new WebInspector.Object(); |
| 52 | 52 |
| 53 this._isPausing = false; | 53 this._isPausing = false; |
| 54 WebInspector.settings.pauseOnExceptionEnabled.addChangeListener(this._pauseO
nExceptionStateChanged, this); | 54 WebInspector.settings.pauseOnExceptionEnabled.addChangeListener(this._pauseO
nExceptionStateChanged, this); |
| 55 WebInspector.settings.pauseOnCaughtException.addChangeListener(this._pauseOn
ExceptionStateChanged, this); | 55 WebInspector.settings.pauseOnCaughtException.addChangeListener(this._pauseOn
ExceptionStateChanged, this); |
| 56 | 56 |
| 57 WebInspector.settings.enableAsyncStackTraces.addChangeListener(this._asyncSt
ackTracesStateChanged, this); | 57 WebInspector.settings.enableAsyncStackTraces.addChangeListener(this._asyncSt
ackTracesStateChanged, this); |
| 58 target.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged,
this._profilingStateChanged, this); | 58 WebInspector.profilingLock.addEventListener(WebInspector.Lock.Events.StateCh
anged, this._profilingStateChanged, this); |
| 59 | 59 |
| 60 this.enableDebugger(); | 60 this.enableDebugger(); |
| 61 | 61 |
| 62 WebInspector.settings.skipStackFramesPattern.addChangeListener(this._applySk
ipStackFrameSettings, this); | 62 WebInspector.settings.skipStackFramesPattern.addChangeListener(this._applySk
ipStackFrameSettings, this); |
| 63 this._applySkipStackFrameSettings(); | 63 this._applySkipStackFrameSettings(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 /** @typedef {{location: ?WebInspector.DebuggerModel.Location, sourceURL: ?strin
g, functionName: string, scopeChain: (Array.<!DebuggerAgent.Scope>|null)}} */ | 66 /** @typedef {{location: ?WebInspector.DebuggerModel.Location, sourceURL: ?strin
g, functionName: string, scopeChain: (Array.<!DebuggerAgent.Scope>|null)}} */ |
| 67 WebInspector.DebuggerModel.FunctionDetails; | 67 WebInspector.DebuggerModel.FunctionDetails; |
| 68 | 68 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 state = WebInspector.DebuggerModel.PauseOnExceptionsState.PauseOnAll
Exceptions; | 164 state = WebInspector.DebuggerModel.PauseOnExceptionsState.PauseOnAll
Exceptions; |
| 165 } else { | 165 } else { |
| 166 state = WebInspector.DebuggerModel.PauseOnExceptionsState.PauseOnUnc
aughtExceptions; | 166 state = WebInspector.DebuggerModel.PauseOnExceptionsState.PauseOnUnc
aughtExceptions; |
| 167 } | 167 } |
| 168 this._agent.setPauseOnExceptions(state); | 168 this._agent.setPauseOnExceptions(state); |
| 169 }, | 169 }, |
| 170 | 170 |
| 171 _profilingStateChanged: function() | 171 _profilingStateChanged: function() |
| 172 { | 172 { |
| 173 if (WebInspector.experimentsSettings.disableAgentsWhenProfile.isEnabled(
)) { | 173 if (WebInspector.experimentsSettings.disableAgentsWhenProfile.isEnabled(
)) { |
| 174 if (this.target().profilingLock.isAcquired()) | 174 if (WebInspector.profilingLock.isAcquired()) |
| 175 this.disableDebugger(); | 175 this.disableDebugger(); |
| 176 else | 176 else |
| 177 this.enableDebugger(); | 177 this.enableDebugger(); |
| 178 } | 178 } |
| 179 this._asyncStackTracesStateChanged(); | 179 this._asyncStackTracesStateChanged(); |
| 180 }, | 180 }, |
| 181 | 181 |
| 182 _asyncStackTracesStateChanged: function() | 182 _asyncStackTracesStateChanged: function() |
| 183 { | 183 { |
| 184 const maxAsyncStackChainDepth = 4; | 184 const maxAsyncStackChainDepth = 4; |
| 185 var enabled = WebInspector.settings.enableAsyncStackTraces.get() && !thi
s.target().profilingLock.isAcquired(); | 185 var enabled = WebInspector.settings.enableAsyncStackTraces.get() && !Web
Inspector.profilingLock.isAcquired(); |
| 186 this._agent.setAsyncCallStackDepth(enabled ? maxAsyncStackChainDepth : 0
); | 186 this._agent.setAsyncCallStackDepth(enabled ? maxAsyncStackChainDepth : 0
); |
| 187 }, | 187 }, |
| 188 | 188 |
| 189 stepInto: function() | 189 stepInto: function() |
| 190 { | 190 { |
| 191 /** | 191 /** |
| 192 * @this {WebInspector.DebuggerModel} | 192 * @this {WebInspector.DebuggerModel} |
| 193 */ | 193 */ |
| 194 function callback() | 194 function callback() |
| 195 { | 195 { |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 return this.target().runtimeModel.createRemoteObject(/** @type {!Runtime
Agent.RemoteObject} */(this.auxData)); | 1100 return this.target().runtimeModel.createRemoteObject(/** @type {!Runtime
Agent.RemoteObject} */(this.auxData)); |
| 1101 }, | 1101 }, |
| 1102 | 1102 |
| 1103 __proto__: WebInspector.SDKObject.prototype | 1103 __proto__: WebInspector.SDKObject.prototype |
| 1104 } | 1104 } |
| 1105 | 1105 |
| 1106 /** | 1106 /** |
| 1107 * @type {!WebInspector.DebuggerModel} | 1107 * @type {!WebInspector.DebuggerModel} |
| 1108 */ | 1108 */ |
| 1109 WebInspector.debuggerModel; | 1109 WebInspector.debuggerModel; |
| OLD | NEW |