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..09f052d8893ce9b746ddf2429f25623e62b4f03f 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); |
loislo
2014/11/07 14:23:11
Could you please put something more readable like
yurys
2014/11/07 14:23:52
Done.
|
}, |
/** |
@@ -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) |