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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js

Issue 2276743004: DevTools: Use stableSort for async events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698