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

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

Issue 1211613002: Timeline: check category presence in list, not string equality (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed tracing-session-id.html Created 5 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 c4563456c336ce8e71438d8adca4c90d073593b2..dd03f36c751b70df4185d2a4c7d17962efb8465d 100644
--- a/Source/devtools/front_end/timeline/TimelineModel.js
+++ b/Source/devtools/front_end/timeline/TimelineModel.js
@@ -361,7 +361,7 @@ WebInspector.TimelineModel.Record.prototype = {
*/
type: function()
{
- if (this._event.category === WebInspector.TracingModel.ConsoleEventCategory)
+ if (this._event.hasCategory(WebInspector.TracingModel.ConsoleEventCategory))
return WebInspector.TimelineModel.RecordType.ConsoleTime;
return this._event.name;
},
@@ -843,7 +843,7 @@ WebInspector.TimelineModel.prototype = {
if (i >= this._inspectedTargetEvents.length)
return;
var drawFrameEvent = this._inspectedTargetEvents[i];
- var firstPaintEvent = new WebInspector.TracingModel.Event(drawFrameEvent.category, recordTypes.MarkFirstPaint, WebInspector.TracingModel.Phase.Instant, drawFrameEvent.startTime, drawFrameEvent.thread);
+ var firstPaintEvent = new WebInspector.TracingModel.Event(drawFrameEvent.categoriesString, recordTypes.MarkFirstPaint, WebInspector.TracingModel.Phase.Instant, drawFrameEvent.startTime, drawFrameEvent.thread);
this._mainThreadEvents.splice(insertionIndexForObjectInListSortedByFunction(firstPaintEvent, this._mainThreadEvents, WebInspector.TracingModel.Event.compareStartTime), 0, firstPaintEvent);
var firstPaintRecord = new WebInspector.TimelineModel.Record(this, firstPaintEvent);
this._eventDividerRecords.splice(insertionIndexForObjectInListSortedByFunction(firstPaintRecord, this._eventDividerRecords, WebInspector.TimelineModel.Record._compareStartTime), 0, firstPaintRecord);
@@ -1233,7 +1233,7 @@ WebInspector.TimelineModel.prototype = {
_processAsyncEvent: function(asyncEvent)
{
var groups = WebInspector.TimelineUIUtils.asyncEventGroups();
- if (asyncEvent.category === WebInspector.TracingModel.ConsoleEventCategory)
+ if (asyncEvent.hasCategory(WebInspector.TracingModel.ConsoleEventCategory))
return groups.console;
return null;
@@ -1569,7 +1569,7 @@ WebInspector.InclusiveTraceEventNameFilter.prototype = {
*/
accept: function(event)
{
- return event.category === WebInspector.TracingModel.ConsoleEventCategory
+ return event.hasCategory(WebInspector.TracingModel.ConsoleEventCategory)
|| !!this._eventNames[event.name];
},
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineFlameChart.js ('k') | Source/devtools/front_end/timeline/TimelineUIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698