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

Unified Diff: Source/devtools/front_end/sdk/TimelineManager.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/front_end/sdk/Target.js ('k') | Source/devtools/front_end/sdk/TracingModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3baa281ff099a9d32fcc7b4f0ac015a3ed69f348..8500f4ebdd506f900055c23073909218b5bf9736 100644
--- a/Source/devtools/front_end/sdk/TimelineManager.js
+++ b/Source/devtools/front_end/sdk/TimelineManager.js
@@ -69,7 +69,7 @@
start: function(maxCallStackDepth, liveEvents, includeCounters, includeGPUEvents, callback)
{
this._enablementCount++;
- WebInspector.profilingLock.acquire();
+ this.target().profilingLock.acquire();
if (WebInspector.experimentsSettings.timelineJSCPUProfile.isEnabled() && maxCallStackDepth) {
this._configureCpuProfilerSamplingInterval();
this._jsProfilerStarted = true;
@@ -103,7 +103,7 @@
if (!this._enablementCount)
this.target().timelineAgent().stop(callbackBarrier.createCallback(timelineCallback));
- callbackBarrier.callWhenDone(allDoneCallback);
+ callbackBarrier.callWhenDone(allDoneCallback.bind(this));
/**
* @param {?Protocol.Error} error
@@ -123,9 +123,12 @@
masterProfile = profile;
}
+ /**
+ * @this {WebInspector.TimelineManager}
+ */
function allDoneCallback()
{
- WebInspector.profilingLock.release();
+ this.target().profilingLock.release();
callback(masterError, masterProfile);
}
},
« no previous file with comments | « Source/devtools/front_end/sdk/Target.js ('k') | Source/devtools/front_end/sdk/TracingModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698