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

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: timeline-websocket-event rebaselined 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 e984509b6f27211553add795cf0422fc93582860..5e16e2e3beb4bf10aafbb0de5cdef54f08cb892e 100644
--- a/Source/devtools/front_end/sdk/TimelineManager.js
+++ b/Source/devtools/front_end/sdk/TimelineManager.js
@@ -46,6 +46,7 @@ WebInspector.TimelineManager.EventTypes = {
TimelineStarted: "TimelineStarted",
TimelineStopped: "TimelineStopped",
TimelineEventRecorded: "TimelineEventRecorded",
+ TimelineAllEventsReceived: "TimelineAllEventsReceived",
TimelineProgress: "TimelineProgress"
}
@@ -60,13 +61,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 +76,7 @@ WebInspector.TimelineManager.prototype = {
this.target().profilerAgent().start();
}
if (this._enablementCount === 1)
- this.target().timelineAgent().start(maxCallStackDepth, bufferEvents, liveEvents, includeCounters, includeGPUEvents, callback);
+ this.target().timelineAgent().start(maxCallStackDepth, true, liveEvents, includeCounters, includeGPUEvents, callback);
else if (callback)
callback(null);
},
@@ -102,7 +102,6 @@ WebInspector.TimelineManager.prototype = {
}
if (!this._enablementCount)
this.target().timelineAgent().stop(callbackBarrier.createCallback(timelineCallback));
- TimelineAgent.stop(callbackBarrier.createCallback(timelineCallback));
callbackBarrier.callWhenDone(allDoneCallback.bind(this));
@@ -135,14 +134,17 @@ WebInspector.TimelineManager.prototype = {
},
/**
+ * @param {boolean=} consoleTimeline
* @param {!Array.<!TimelineAgent.TimelineEvent>=} events
*/
- _processBufferedEvents: function(events)
+ _stopped: function(consoleTimeline, events)
{
+ this.dispatchEventToListeners(WebInspector.TimelineManager.EventTypes.TimelineStopped, consoleTimeline);
if (events) {
for (var i = 0; i < events.length; ++i)
this._dispatcher.eventRecorded(events[i]);
}
+ this.dispatchEventToListeners(WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, 0);
},
_configureCpuProfilerSamplingInterval: function()
@@ -207,8 +209,7 @@ WebInspector.TimelineDispatcher.prototype = {
stopped: function(consoleTimeline, events)
{
this._started = false;
- this._manager.dispatchEventToListeners(WebInspector.TimelineManager.EventTypes.TimelineStopped, consoleTimeline);
- this._manager._processBufferedEvents(events);
+ this._manager._stopped(consoleTimeline, events);
},
/**
« no previous file with comments | « Source/devtools/front_end/common/Settings.js ('k') | Source/devtools/front_end/timeline/TimelineModelImpl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698