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

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

Issue 475803002: Make profiling lock global rather than per Target (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Extracted Lock.js 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
Index: Source/devtools/front_end/sdk/CSSStyleModel.js
diff --git a/Source/devtools/front_end/sdk/CSSStyleModel.js b/Source/devtools/front_end/sdk/CSSStyleModel.js
index febf7efcb6fd2d7ea00dcc260ea6ee6a6d4c1a20..1400986028865ae143dfc9507488629f7b9bb0fc 100644
--- a/Source/devtools/front_end/sdk/CSSStyleModel.js
+++ b/Source/devtools/front_end/sdk/CSSStyleModel.js
@@ -51,7 +51,7 @@ WebInspector.CSSStyleModel = function(target)
this._styleSheetIdsForURL = new StringMap();
if (WebInspector.experimentsSettings.disableAgentsWhenProfile.isEnabled())
- target.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged, this._profilingStateChanged, this);
+ WebInspector.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged, this._profilingStateChanged, this);
}
WebInspector.CSSStyleModel.PseudoStatePropertyName = "pseudoState";
@@ -85,7 +85,7 @@ WebInspector.CSSStyleModel.MediaTypes = ["all", "braille", "embossed", "handheld
WebInspector.CSSStyleModel.prototype = {
_profilingStateChanged: function()
{
- if (this.target().profilingLock.isAcquired()) {
+ if (WebInspector.profilingLock.isAcquired()) {
this._agent.disable();
this._isEnabled = false;
this._resetStyleSheets();

Powered by Google App Engine
This is Rietveld 408576698