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

Unified Diff: Source/devtools/front_end/sdk/TimelineManager.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/TimelineManager.js
diff --git a/Source/devtools/front_end/sdk/TimelineManager.js b/Source/devtools/front_end/sdk/TimelineManager.js
index 8500f4ebdd506f900055c23073909218b5bf9736..3baa281ff099a9d32fcc7b4f0ac015a3ed69f348 100644
--- a/Source/devtools/front_end/sdk/TimelineManager.js
+++ b/Source/devtools/front_end/sdk/TimelineManager.js
@@ -69,7 +69,7 @@ WebInspector.TimelineManager.prototype = {
start: function(maxCallStackDepth, liveEvents, includeCounters, includeGPUEvents, callback)
{
this._enablementCount++;
- this.target().profilingLock.acquire();
+ WebInspector.profilingLock.acquire();
if (WebInspector.experimentsSettings.timelineJSCPUProfile.isEnabled() && maxCallStackDepth) {
this._configureCpuProfilerSamplingInterval();
this._jsProfilerStarted = true;
@@ -103,7 +103,7 @@ WebInspector.TimelineManager.prototype = {
if (!this._enablementCount)
this.target().timelineAgent().stop(callbackBarrier.createCallback(timelineCallback));
- callbackBarrier.callWhenDone(allDoneCallback.bind(this));
+ callbackBarrier.callWhenDone(allDoneCallback);
/**
* @param {?Protocol.Error} error
@@ -123,12 +123,9 @@ WebInspector.TimelineManager.prototype = {
masterProfile = profile;
}
- /**
- * @this {WebInspector.TimelineManager}
- */
function allDoneCallback()
{
- this.target().profilingLock.release();
+ WebInspector.profilingLock.release();
callback(masterError, masterProfile);
}
},

Powered by Google App Engine
This is Rietveld 408576698