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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineModel.js

Issue 2163093003: [DevTools] Remove Object.values and Object.isEmpty from utilities.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 }, 583 },
584 584
585 /** 585 /**
586 * @param {!WebInspector.TracingModel} tracingModel 586 * @param {!WebInspector.TracingModel} tracingModel
587 * @return {?WebInspector.TracingModel.Event} 587 * @return {?WebInspector.TracingModel.Event}
588 */ 588 */
589 _makeMockPageMetadataEvent: function(tracingModel) 589 _makeMockPageMetadataEvent: function(tracingModel)
590 { 590 {
591 var rendererMainThreadName = WebInspector.TimelineModel.RendererMainThre adName; 591 var rendererMainThreadName = WebInspector.TimelineModel.RendererMainThre adName;
592 // FIXME: pick up the first renderer process for now. 592 // FIXME: pick up the first renderer process for now.
593 var process = Object.values(tracingModel.sortedProcesses()).filter(funct ion(p) { return p.threadByName(rendererMainThreadName); })[0]; 593 var process = tracingModel.sortedProcesses().filter(function(p) { return p.threadByName(rendererMainThreadName); })[0];
594 var thread = process && process.threadByName(rendererMainThreadName); 594 var thread = process && process.threadByName(rendererMainThreadName);
595 if (!thread) 595 if (!thread)
596 return null; 596 return null;
597 var pageMetaEvent = new WebInspector.TracingModel.Event( 597 var pageMetaEvent = new WebInspector.TracingModel.Event(
598 WebInspector.TracingModel.DevToolsMetadataEventCategory, 598 WebInspector.TracingModel.DevToolsMetadataEventCategory,
599 WebInspector.TimelineModel.DevToolsMetadataEvent.TracingStartedInPag e, 599 WebInspector.TimelineModel.DevToolsMetadataEvent.TracingStartedInPag e,
600 WebInspector.TracingModel.Phase.Metadata, 600 WebInspector.TracingModel.Phase.Metadata,
601 tracingModel.minimumRecordTime(), thread); 601 tracingModel.minimumRecordTime(), thread);
602 pageMetaEvent.addArgs({"data": {"sessionId": "mockSessionId"}}); 602 pageMetaEvent.addArgs({"data": {"sessionId": "mockSessionId"}});
603 return pageMetaEvent; 603 return pageMetaEvent;
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1759 if (!id) 1759 if (!id)
1760 return; 1760 return;
1761 /** @type {!Map<string, !WebInspector.TracingModel.Event>|undefined} */ 1761 /** @type {!Map<string, !WebInspector.TracingModel.Event>|undefined} */
1762 var initiatorMap = this._initiatorByType.get(initiatorType); 1762 var initiatorMap = this._initiatorByType.get(initiatorType);
1763 if (isInitiator) 1763 if (isInitiator)
1764 initiatorMap.set(id, event); 1764 initiatorMap.set(id, event);
1765 else 1765 else
1766 event.initiator = initiatorMap.get(id) || null; 1766 event.initiator = initiatorMap.get(id) || null;
1767 } 1767 }
1768 } 1768 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698