| Index: Source/devtools/front_end/timeline/TracingTimelineModel.js
|
| diff --git a/Source/devtools/front_end/timeline/TracingTimelineModel.js b/Source/devtools/front_end/timeline/TracingTimelineModel.js
|
| index 417ac2269ad3feaaa112e874f4fed7550464ad66..ebeca915844946c37e5a38f79e40956ca2ba77e6 100644
|
| --- a/Source/devtools/front_end/timeline/TracingTimelineModel.js
|
| +++ b/Source/devtools/front_end/timeline/TracingTimelineModel.js
|
| @@ -178,7 +178,7 @@ WebInspector.TracingTimelineModel.prototype = {
|
| */
|
| setEventsForTest: function(events)
|
| {
|
| - this._onTracingStarted();
|
| + this._startCollectingTraceEvents(false);
|
| this._tracingModel.addEvents(events);
|
| this._onTracingComplete();
|
| },
|
| @@ -205,9 +205,17 @@ WebInspector.TracingTimelineModel.prototype = {
|
|
|
| _onTracingStarted: function()
|
| {
|
| + this._startCollectingTraceEvents(false);
|
| + },
|
| +
|
| + /**
|
| + * @param {boolean} fromFile
|
| + */
|
| + _startCollectingTraceEvents: function(fromFile)
|
| + {
|
| this.reset();
|
| this._tracingModel.reset();
|
| - this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingStarted);
|
| + this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingStarted, { fromFile: fromFile });
|
| },
|
|
|
| /**
|
| @@ -1046,7 +1054,7 @@ WebInspector.TracingModelLoader.prototype = {
|
| return;
|
|
|
| if (this._firstChunk) {
|
| - this._model._onTracingStarted();
|
| + this._model._startCollectingTraceEvents(true);
|
| } else {
|
| var commaIndex = json.indexOf(",");
|
| if (commaIndex !== -1)
|
|
|