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

Side by Side Diff: Source/devtools/front_end/timeline/TimelinePresentationModel.js

Issue 342473003: Use isProgram method to detect Program events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 this._rootRecord = new WebInspector.TimelinePresentationModel.RootRecord (); 81 this._rootRecord = new WebInspector.TimelinePresentationModel.RootRecord ();
82 /** @type {!Object.<string, !WebInspector.TimelinePresentationModel.Reco rd>} */ 82 /** @type {!Object.<string, !WebInspector.TimelinePresentationModel.Reco rd>} */
83 this._coalescingBuckets = {}; 83 this._coalescingBuckets = {};
84 }, 84 },
85 85
86 /** 86 /**
87 * @param {!WebInspector.TimelineModel.Record} record 87 * @param {!WebInspector.TimelineModel.Record} record
88 */ 88 */
89 addRecord: function(record) 89 addRecord: function(record)
90 { 90 {
91 var records; 91 if (record.isProgram()) {
92 if (record.type() === WebInspector.TimelineModel.RecordType.Program) 92 var records = record.children();
93 records = record.children(); 93 for (var i = 0; i < records.length; ++i)
94 else 94 this._innerAddRecord(this._rootRecord, records[i]);
95 records = [record]; 95 } else {
96 96 this._innerAddRecord(this._rootRecord, record);
97 for (var i = 0; i < records.length; ++i) 97 }
98 this._innerAddRecord(this._rootRecord, records[i]);
99 }, 98 },
100 99
101 /** 100 /**
102 * @param {!WebInspector.TimelinePresentationModel.Record} parentRecord 101 * @param {!WebInspector.TimelinePresentationModel.Record} parentRecord
103 * @param {!WebInspector.TimelineModel.Record} record 102 * @param {!WebInspector.TimelineModel.Record} record
104 */ 103 */
105 _innerAddRecord: function(parentRecord, record) 104 _innerAddRecord: function(parentRecord, record)
106 { 105 {
107 var coalescingBucket; 106 var coalescingBucket;
108 107
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 /** 598 /**
600 * @return {boolean} 599 * @return {boolean}
601 */ 600 */
602 hasWarnings: function() 601 hasWarnings: function()
603 { 602 {
604 return false; 603 return false;
605 }, 604 },
606 605
607 __proto__: WebInspector.TimelinePresentationModel.Record.prototype 606 __proto__: WebInspector.TimelinePresentationModel.Record.prototype
608 } 607 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModelImpl.js ('k') | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698