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

Unified Diff: Source/devtools/front_end/audits/AuditLauncherView.js

Issue 471393002: Revert of Make profiling lock global rather than per Target (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/devtools.gypi ('k') | Source/devtools/front_end/common/Lock.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/audits/AuditLauncherView.js
diff --git a/Source/devtools/front_end/audits/AuditLauncherView.js b/Source/devtools/front_end/audits/AuditLauncherView.js
index 994c769224b4b68755ae65e8ac67e7d2c5b50b90..c1f4f37b7d80f2b1e7c3e94d8960bc76f245c1b0 100644
--- a/Source/devtools/front_end/audits/AuditLauncherView.js
+++ b/Source/devtools/front_end/audits/AuditLauncherView.js
@@ -63,7 +63,7 @@
var target = this._auditController.target();
target.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestStarted, this._onRequestStarted, this);
target.networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestFinished, this._onRequestFinished, this);
- WebInspector.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged, this._updateButton, this);
+ target.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged, this._updateButton, this);
var defaultSelectedAuditCategory = {};
defaultSelectedAuditCategory[WebInspector.AuditLauncherView.AllCategoriesKey] = true;
@@ -144,11 +144,11 @@
this._toggleUIComponents(this._auditRunning);
var target = this._auditController.target();
if (this._auditRunning) {
- WebInspector.profilingLock.acquire();
+ target.profilingLock.acquire();
this._startAudit();
} else {
this._stopAudit();
- WebInspector.profilingLock.release();
+ target.profilingLock.release();
}
},
@@ -327,7 +327,7 @@
_updateButton: function()
{
var target = this._auditController.target();
- var enable = this._auditRunning || (this._currentCategoriesCount && !WebInspector.profilingLock.isAcquired());
+ var enable = this._auditRunning || (this._currentCategoriesCount && !target.profilingLock.isAcquired());
this._launchButton.textContent = this._auditRunning ? WebInspector.UIString("Stop") : WebInspector.UIString("Run");
this._launchButton.disabled = !enable;
this._launchButton.title = enable ? "" : WebInspector.anotherProfilerActiveLabel();
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/common/Lock.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698