OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The Chromium Authors. All rights reserved. | 2 * Copyright 2014 The Chromium Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 /** | 7 /** |
8 * @constructor | 8 * @constructor |
9 * @param {!WebInspector.BackingStorage} backingStorage | 9 * @param {!WebInspector.BackingStorage} backingStorage |
10 */ | 10 */ |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 * @return {?WebInspector.TracingModel.Thread} | 290 * @return {?WebInspector.TracingModel.Thread} |
291 */ | 291 */ |
292 threadByName: function(processName, threadName) | 292 threadByName: function(processName, threadName) |
293 { | 293 { |
294 var process = this.processByName(processName); | 294 var process = this.processByName(processName); |
295 return process && process.threadByName(threadName); | 295 return process && process.threadByName(threadName); |
296 }, | 296 }, |
297 | 297 |
298 _processPendingAsyncEvents: function() | 298 _processPendingAsyncEvents: function() |
299 { | 299 { |
300 this._asyncEvents.sort(WebInspector.TracingModel.Event.compareStartTime)
; | 300 this._asyncEvents.stableSort(WebInspector.TracingModel.Event.compareStar
tTime); |
301 for (var i = 0; i < this._asyncEvents.length; ++i) { | 301 for (var i = 0; i < this._asyncEvents.length; ++i) { |
302 var event = this._asyncEvents[i]; | 302 var event = this._asyncEvents[i]; |
303 if (WebInspector.TracingModel.isNestableAsyncPhase(event.phase)) | 303 if (WebInspector.TracingModel.isNestableAsyncPhase(event.phase)) |
304 this._addNestableAsyncEvent(event); | 304 this._addNestableAsyncEvent(event); |
305 else | 305 else |
306 this._addAsyncEvent(event); | 306 this._addAsyncEvent(event); |
307 } | 307 } |
308 this._asyncEvents = []; | 308 this._asyncEvents = []; |
309 this._closeOpenAsyncEvents(); | 309 this._closeOpenAsyncEvents(); |
310 }, | 310 }, |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 /** | 928 /** |
929 * @return {!Array.<!WebInspector.TracingModel.AsyncEvent>} | 929 * @return {!Array.<!WebInspector.TracingModel.AsyncEvent>} |
930 */ | 930 */ |
931 asyncEvents: function() | 931 asyncEvents: function() |
932 { | 932 { |
933 return this._asyncEvents; | 933 return this._asyncEvents; |
934 }, | 934 }, |
935 | 935 |
936 __proto__: WebInspector.TracingModel.NamedObject.prototype | 936 __proto__: WebInspector.TracingModel.NamedObject.prototype |
937 } | 937 } |
OLD | NEW |