Index: Source/devtools/front_end/sdk/DebuggerModel.js |
diff --git a/Source/devtools/front_end/sdk/DebuggerModel.js b/Source/devtools/front_end/sdk/DebuggerModel.js |
index 5ff0e6f03c09caae0e3dc53167a21975905cb8fd..df3001a6a6d3a6126fb865db40f11f521447da80 100644 |
--- a/Source/devtools/front_end/sdk/DebuggerModel.js |
+++ b/Source/devtools/front_end/sdk/DebuggerModel.js |
@@ -53,14 +53,12 @@ WebInspector.DebuggerModel = function(target) |
this._isPausing = false; |
WebInspector.settings.pauseOnExceptionEnabled.addChangeListener(this._pauseOnExceptionStateChanged, this); |
WebInspector.settings.pauseOnCaughtException.addChangeListener(this._pauseOnExceptionStateChanged, this); |
- |
WebInspector.settings.enableAsyncStackTraces.addChangeListener(this._asyncStackTracesStateChanged, this); |
- WebInspector.profilingLock().addEventListener(WebInspector.Lock.Events.StateChanged, this._profilingStateChanged, this); |
+ WebInspector.settings.skipStackFramesPattern.addChangeListener(this._applySkipStackFrameSettings, this); |
+ WebInspector.settings.skipContentScripts.addChangeListener(this._applySkipStackFrameSettings, this); |
this.enableDebugger(); |
- WebInspector.settings.skipStackFramesPattern.addChangeListener(this._applySkipStackFrameSettings, this); |
- WebInspector.settings.skipContentScripts.addChangeListener(this._applySkipStackFrameSettings, this); |
this._applySkipStackFrameSettings(); |
} |
@@ -128,6 +126,7 @@ WebInspector.DebuggerModel.prototype = { |
this._agent.disable(); |
this._debuggerEnabled = false; |
this._isPausing = false; |
+ this._asyncStackTracesStateChanged(); |
this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.DebuggerWasDisabled); |
}, |
@@ -169,21 +168,20 @@ WebInspector.DebuggerModel.prototype = { |
this._agent.setPauseOnExceptions(state); |
}, |
- _profilingStateChanged: function() |
+ suspendModel: function() |
{ |
- if (Runtime.experiments.isEnabled("disableAgentsWhenProfile")) { |
- if (WebInspector.profilingLock().isAcquired()) |
- this.disableDebugger(); |
- else |
- this.enableDebugger(); |
- } |
- this._asyncStackTracesStateChanged(); |
+ this.disableDebugger(); |
+ }, |
+ |
+ resumeModel: function() |
+ { |
+ this.enableDebugger(); |
}, |
_asyncStackTracesStateChanged: function() |
{ |
const maxAsyncStackChainDepth = 4; |
- var enabled = WebInspector.settings.enableAsyncStackTraces.get() && !WebInspector.profilingLock().isAcquired(); |
+ var enabled = WebInspector.settings.enableAsyncStackTraces.get() && !WebInspector.targetManager.areTargetsSuspended(); |
this._agent.setAsyncCallStackDepth(enabled ? maxAsyncStackChainDepth : 0); |
}, |