Chromium Code Reviews| 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) |