Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1132)

Unified Diff: Source/devtools/front_end/sdk/DebuggerModel.js

Issue 614323003: DevTools: enable by default disableAgentsWhenProfile experiment (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: small change Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
},

Powered by Google App Engine
This is Rietveld 408576698