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

Unified Diff: Source/devtools/front_end/timeline/TimelineModel.js

Issue 319743002: Timeline: decouple TimelineFrameModel from TimelineModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/timeline/TimelineModel.js
diff --git a/Source/devtools/front_end/timeline/TimelineModel.js b/Source/devtools/front_end/timeline/TimelineModel.js
index f913ee67db964d32260343be6cb8cdccd43f0847..aece89722c394eb607f89f6d5dae581fb7cc29bd 100644
--- a/Source/devtools/front_end/timeline/TimelineModel.js
+++ b/Source/devtools/front_end/timeline/TimelineModel.js
@@ -243,13 +243,12 @@ WebInspector.TimelineModel.prototype = {
this._clientInitiatedRecording = true;
this.reset();
var maxStackFrames = captureStacks ? 30 : 0;
- this._bufferEvents = WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled();
var includeGPUEvents = WebInspector.experimentsSettings.gpuTimeline.isEnabled();
var liveEvents = [ WebInspector.TimelineModel.RecordType.BeginFrame,
WebInspector.TimelineModel.RecordType.DrawFrame,
WebInspector.TimelineModel.RecordType.RequestMainThreadFrame,
WebInspector.TimelineModel.RecordType.ActivateLayerTree ];
- this._timelineManager.start(maxStackFrames, this._bufferEvents, liveEvents.join(","), captureMemory, includeGPUEvents, this._fireRecordingStarted.bind(this));
+ this._timelineManager.start(maxStackFrames, WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled(), liveEvents.join(","), captureMemory, includeGPUEvents, this._fireRecordingStarted.bind(this));
},
stopRecording: function()
@@ -352,6 +351,9 @@ WebInspector.TimelineModel.prototype = {
*/
_onStopped: function(event)
{
+ // If we were buffering events, discard those that got through, the real ones are coming!
+ if (WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled())
+ this.reset();
if (event.data) {
// Stopped from console.
this._fireRecordingStopped(null, null);
@@ -378,7 +380,6 @@ WebInspector.TimelineModel.prototype = {
*/
_fireRecordingStopped: function(error, cpuProfile)
{
- this._bufferEvents = false;
this._collectionEnabled = false;
if (cpuProfile)
WebInspector.TimelineJSProfileProcessor.mergeJSProfileIntoTimeline(this, cpuProfile);
@@ -386,14 +387,6 @@ WebInspector.TimelineModel.prototype = {
},
/**
- * @return {boolean}
- */
- bufferEvents: function()
yurys 2014/06/06 07:07:34 You will need to rebase.
- {
- return this._bufferEvents;
- },
-
- /**
* @param {!TimelineAgent.TimelineEvent} payload
*/
_addRecord: function(payload)
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineFrameModel.js ('k') | Source/devtools/front_end/timeline/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698