| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @param {!WebInspector.TracingModel} tracingModel | 7 * @param {!WebInspector.TracingModel} tracingModel |
| 8 * @param {!WebInspector.TimelineModel.Filter} recordFilter | 8 * @param {!WebInspector.TimelineModel.Filter} recordFilter |
| 9 * @extends {WebInspector.TimelineModel} | 9 * @extends {WebInspector.TimelineModel} |
| 10 */ | 10 */ |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 var event = mainThreadEvents[i]; | 232 var event = mainThreadEvents[i]; |
| 233 while (recordStack.length) { | 233 while (recordStack.length) { |
| 234 var top = recordStack.peekLast(); | 234 var top = recordStack.peekLast(); |
| 235 if (top._event.endTime >= event.startTime) | 235 if (top._event.endTime >= event.startTime) |
| 236 break; | 236 break; |
| 237 recordStack.pop(); | 237 recordStack.pop(); |
| 238 if (!recordStack.length) | 238 if (!recordStack.length) |
| 239 this._addTopLevelRecord(top); | 239 this._addTopLevelRecord(top); |
| 240 } | 240 } |
| 241 var record = new WebInspector.TracingTimelineModel.TraceEventRecord(
this, event); | 241 var record = new WebInspector.TracingTimelineModel.TraceEventRecord(
this, event); |
| 242 if (WebInspector.TracingTimelineUIUtils.isEventDivider(record)) | 242 if (WebInspector.TracingTimelineUIUtils.isMarkerEvent(event)) |
| 243 this._eventDividerRecords.push(record); | 243 this._eventDividerRecords.push(record); |
| 244 if (!this._recordFilter.accept(record)) | 244 if (!this._recordFilter.accept(record)) |
| 245 continue; | 245 continue; |
| 246 var parentRecord = recordStack.peekLast(); | 246 var parentRecord = recordStack.peekLast(); |
| 247 if (parentRecord) | 247 if (parentRecord) |
| 248 parentRecord._addChild(record); | 248 parentRecord._addChild(record); |
| 249 if (event.endTime) | 249 if (event.endTime) |
| 250 recordStack.push(record); | 250 recordStack.push(record); |
| 251 } | 251 } |
| 252 if (recordStack.length) | 252 if (recordStack.length) |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 }, | 754 }, |
| 755 | 755 |
| 756 /** | 756 /** |
| 757 * @return {!WebInspector.TimelineModel} | 757 * @return {!WebInspector.TimelineModel} |
| 758 */ | 758 */ |
| 759 timelineModel: function() | 759 timelineModel: function() |
| 760 { | 760 { |
| 761 return this._model; | 761 return this._model; |
| 762 } | 762 } |
| 763 } | 763 } |
| OLD | NEW |