OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 records = [record]; | 74 records = [record]; |
75 records.forEach(this._innerAddRecord.bind(this, programRecord)); | 75 records.forEach(this._innerAddRecord.bind(this, programRecord)); |
76 }, | 76 }, |
77 | 77 |
78 /** | 78 /** |
79 * @param {Object} programRecord | 79 * @param {Object} programRecord |
80 * @param {Object} record | 80 * @param {Object} record |
81 */ | 81 */ |
82 _innerAddRecord: function(programRecord, record) | 82 _innerAddRecord: function(programRecord, record) |
83 { | 83 { |
84 if (record.type === WebInspector.TimelineModel.RecordType.SoC_Package) | |
pfeldman
2014/01/09 11:38:52
You should not skip records of any kind.
Pan
2014/02/24 09:49:47
removed this change
| |
85 return; | |
84 var isFrameRecord = record.type === WebInspector.TimelineModel.RecordTyp e.BeginFrame; | 86 var isFrameRecord = record.type === WebInspector.TimelineModel.RecordTyp e.BeginFrame; |
85 var programTimeCarryover = isFrameRecord && programRecord ? WebInspector .TimelineModel.endTimeInSeconds(programRecord) - WebInspector.TimelineModel.star tTimeInSeconds(record) : 0; | 87 var programTimeCarryover = isFrameRecord && programRecord ? WebInspector .TimelineModel.endTimeInSeconds(programRecord) - WebInspector.TimelineModel.star tTimeInSeconds(record) : 0; |
86 var lastFrame = record.thread ? this._lastBackgroundFrame : this._lastMa inThreadFrame; | 88 var lastFrame = record.thread ? this._lastBackgroundFrame : this._lastMa inThreadFrame; |
87 if (isFrameRecord && lastFrame) { | 89 if (isFrameRecord && lastFrame) { |
88 this._flushFrame(lastFrame, record, programTimeCarryover); | 90 this._flushFrame(lastFrame, record, programTimeCarryover); |
89 lastFrame = this._createFrame(record, programTimeCarryover); | 91 lastFrame = this._createFrame(record, programTimeCarryover); |
90 } else if (record.type === WebInspector.TimelineModel.RecordType.Activat eLayerTree) { | 92 } else if (record.type === WebInspector.TimelineModel.RecordType.Activat eLayerTree) { |
91 if (lastFrame) | 93 if (lastFrame) |
92 lastFrame.mainThreadFrameId = record.data.id; | 94 lastFrame.mainThreadFrameId = record.data.id; |
93 } else { | 95 } else { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 /** | 179 /** |
178 * @constructor | 180 * @constructor |
179 */ | 181 */ |
180 WebInspector.TimelineFrame = function() | 182 WebInspector.TimelineFrame = function() |
181 { | 183 { |
182 this.timeByCategory = {}; | 184 this.timeByCategory = {}; |
183 this.cpuTime = 0; | 185 this.cpuTime = 0; |
184 /** @type {string} */ | 186 /** @type {string} */ |
185 this.mainThreadFrameId; | 187 this.mainThreadFrameId; |
186 } | 188 } |
OLD | NEW |