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

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

Issue 399043002: DevTools: switch Timeline frontend into buffered mode and remove the corresponding experiment. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor changes Created 6 years, 5 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 28d272e619001eaab24e7d667f62825822ac8263..5f216d77fa6c1586eabc1f782be84d278307986d 100644
--- a/Source/devtools/front_end/sdk/TimelineManager.js
+++ b/Source/devtools/front_end/sdk/TimelineManager.js
@@ -60,13 +60,12 @@ WebInspector.TimelineManager.prototype = {
/**
* @param {number=} maxCallStackDepth
- * @param {boolean=} bufferEvents
* @param {string=} liveEvents
* @param {boolean=} includeCounters
* @param {boolean=} includeGPUEvents
* @param {function(?Protocol.Error)=} callback
*/
- start: function(maxCallStackDepth, bufferEvents, liveEvents, includeCounters, includeGPUEvents, callback)
+ start: function(maxCallStackDepth, liveEvents, includeCounters, includeGPUEvents, callback)
{
this._enablementCount++;
this.target().profilingLock.acquire();
@@ -76,7 +75,7 @@ WebInspector.TimelineManager.prototype = {
ProfilerAgent.start();
}
if (this._enablementCount === 1)
- TimelineAgent.start(maxCallStackDepth, bufferEvents, liveEvents, includeCounters, includeGPUEvents, callback);
+ TimelineAgent.start(maxCallStackDepth, liveEvents, includeCounters, includeGPUEvents, callback);
else if (callback)
callback(null);
},
@@ -101,7 +100,7 @@ WebInspector.TimelineManager.prototype = {
this._jsProfilerStarted = false;
}
if (!this._enablementCount)
- TimelineAgent.stop(callbackBarrier.createCallback(this._processBufferedEvents.bind(this, timelineCallback)));
+ TimelineAgent.stop(callbackBarrier.createCallback(timelineCallback));
callbackBarrier.callWhenDone(allDoneCallback.bind(this));
@@ -134,18 +133,14 @@ WebInspector.TimelineManager.prototype = {
},
/**
- * @param {function(?Protocol.Error)|undefined} callback
- * @param {?Protocol.Error} error
* @param {!Array.<!TimelineAgent.TimelineEvent>=} events
*/
- _processBufferedEvents: function(callback, error, events)
+ _processBufferedEvents: function(events)
{
if (events) {
for (var i = 0; i < events.length; ++i)
this._dispatcher.eventRecorded(events[i]);
}
- if (callback)
- callback(error);
},
_configureCpuProfilerSamplingInterval: function()
@@ -208,11 +203,13 @@ WebInspector.TimelineDispatcher.prototype = {
/**
* @param {boolean=} consoleTimeline
+ * @param {!Array.<!TimelineAgent.TimelineEvent>=} events
*/
- stopped: function(consoleTimeline)
+ stopped: function(consoleTimeline, events)
{
this._started = false;
this._manager.dispatchEventToListeners(WebInspector.TimelineManager.EventTypes.TimelineStopped, consoleTimeline);
+ this._manager._processBufferedEvents(events);
},
/**

Powered by Google App Engine
This is Rietveld 408576698