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

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

Issue 705273002: DevTools: loading timeline pretends it is recording w/ 0 events collected. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698