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

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

Issue 1984103004: DevTools: Add initiator field to timeline network events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update the test Created 4 years, 7 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 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 817
818 if (eventStack.length && eventStack.peekLast().name === recordTypes.Even tDispatch) 818 if (eventStack.length && eventStack.peekLast().name === recordTypes.Even tDispatch)
819 eventStack.peekLast().hasChildren = true; 819 eventStack.peekLast().hasChildren = true;
820 this._asyncEventTracker.processEvent(event); 820 this._asyncEventTracker.processEvent(event);
821 if (event.initiator && event.initiator.url) 821 if (event.initiator && event.initiator.url)
822 event.url = event.initiator.url; 822 event.url = event.initiator.url;
823 switch (event.name) { 823 switch (event.name) {
824 case recordTypes.ResourceSendRequest: 824 case recordTypes.ResourceSendRequest:
825 case recordTypes.WebSocketCreate: 825 case recordTypes.WebSocketCreate:
826 event.url = event.args["data"]["url"]; 826 event.url = event.args["data"]["url"];
827 event.initiator = eventStack.peekLast() || null;
827 break; 828 break;
828 829
829 case recordTypes.ScheduleStyleRecalculation: 830 case recordTypes.ScheduleStyleRecalculation:
830 this._lastScheduleStyleRecalculation[event.args["data"]["frame"]] = event; 831 this._lastScheduleStyleRecalculation[event.args["data"]["frame"]] = event;
831 break; 832 break;
832 833
833 case recordTypes.UpdateLayoutTree: 834 case recordTypes.UpdateLayoutTree:
834 case recordTypes.RecalculateStyles: 835 case recordTypes.RecalculateStyles:
835 this._invalidationTracker.didRecalcStyle(event); 836 this._invalidationTracker.didRecalcStyle(event);
836 if (event.args["beginData"]) 837 if (event.args["beginData"])
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
1718 if (!id) 1719 if (!id)
1719 return; 1720 return;
1720 /** @type {!Map<string, !WebInspector.TracingModel.Event>|undefined} */ 1721 /** @type {!Map<string, !WebInspector.TracingModel.Event>|undefined} */
1721 var initiatorMap = this._initiatorByType.get(initiatorType); 1722 var initiatorMap = this._initiatorByType.get(initiatorType);
1722 if (isInitiator) 1723 if (isInitiator)
1723 initiatorMap.set(id, event); 1724 initiatorMap.set(id, event);
1724 else 1725 else
1725 event.initiator = initiatorMap.get(id) || null; 1726 event.initiator = initiatorMap.get(id) || null;
1726 } 1727 }
1727 } 1728 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698