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

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

Issue 335403003: DevTools: disable debugger when a profiler is active. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments addressed Created 6 years, 6 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
« no previous file with comments | « Source/devtools/front_end/common/Settings.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c5a77e9596cfdd45ce7db7754d52d78d34e61f48..846615e08006d7df1c16a18d8e297e50f3deabd9 100644
--- a/Source/devtools/front_end/sdk/DebuggerModel.js
+++ b/Source/devtools/front_end/sdk/DebuggerModel.js
@@ -55,7 +55,7 @@ WebInspector.DebuggerModel = function(target)
WebInspector.settings.pauseOnCaughtException.addChangeListener(this._pauseOnExceptionStateChanged, this);
WebInspector.settings.enableAsyncStackTraces.addChangeListener(this._asyncStackTracesStateChanged, this);
- target.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged, this._asyncStackTracesStateChanged, this);
+ target.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged, this._profilingStateChanged, this);
this.enableDebugger();
@@ -169,6 +169,17 @@ WebInspector.DebuggerModel.prototype = {
this._agent.setPauseOnExceptions(state);
},
+ _profilingStateChanged: function()
+ {
+ if (WebInspector.experimentsSettings.disableAgentsWhenProfile.isEnabled()) {
+ if (this.target().profilingLock.isAcquired())
+ this.disableDebugger();
+ else
+ this.enableDebugger();
+ }
+ this._asyncStackTracesStateChanged();
+ },
+
_asyncStackTracesStateChanged: function()
{
const maxAsyncStackChainDepth = 4;
« no previous file with comments | « Source/devtools/front_end/common/Settings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698