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

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

Issue 2701753003: [WIP] off-main-thread loading
Patch Set: small fix Created 3 years, 8 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 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 networkRequests() { 1004 networkRequests() {
1005 /** @type {!Map<string,!TimelineModel.TimelineModel.NetworkRequest>} */ 1005 /** @type {!Map<string,!TimelineModel.TimelineModel.NetworkRequest>} */
1006 var requests = new Map(); 1006 var requests = new Map();
1007 /** @type {!Array<!TimelineModel.TimelineModel.NetworkRequest>} */ 1007 /** @type {!Array<!TimelineModel.TimelineModel.NetworkRequest>} */
1008 var requestsList = []; 1008 var requestsList = [];
1009 /** @type {!Array<!TimelineModel.TimelineModel.NetworkRequest>} */ 1009 /** @type {!Array<!TimelineModel.TimelineModel.NetworkRequest>} */
1010 var zeroStartRequestsList = []; 1010 var zeroStartRequestsList = [];
1011 var types = TimelineModel.TimelineModel.RecordType; 1011 var types = TimelineModel.TimelineModel.RecordType;
1012 var resourceTypes = new Set( 1012 var resourceTypes = new Set(
1013 [types.ResourceSendRequest, types.ResourceReceiveResponse, types.Resourc eReceivedData, types.ResourceFinish]); 1013 [types.ResourceSendRequest, types.ResourceReceiveResponse, types.Resourc eReceivedData, types.ResourceFinish]);
1014 var events = this.mainThreadEvents(); 1014 var events = this.inspectedTargetEvents();
1015 for (var i = 0; i < events.length; ++i) { 1015 for (var i = 0; i < events.length; ++i) {
1016 var e = events[i]; 1016 var e = events[i];
1017 if (!resourceTypes.has(e.name)) 1017 if (!resourceTypes.has(e.name))
1018 continue; 1018 continue;
1019 var id = TimelineModel.TimelineModel.globalEventId(e, 'requestId'); 1019 var id = TimelineModel.TimelineModel.globalEventId(e, 'requestId');
1020 var request = requests.get(id); 1020 var request = requests.get(id);
1021 if (request) { 1021 if (request) {
1022 request.addEvent(e); 1022 request.addEvent(e);
1023 } else { 1023 } else {
1024 request = new TimelineModel.TimelineModel.NetworkRequest(e); 1024 request = new TimelineModel.TimelineModel.NetworkRequest(e);
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 var data = event[TimelineModel.TimelineData._symbol]; 1804 var data = event[TimelineModel.TimelineData._symbol];
1805 if (!data) { 1805 if (!data) {
1806 data = new TimelineModel.TimelineData(); 1806 data = new TimelineModel.TimelineData();
1807 event[TimelineModel.TimelineData._symbol] = data; 1807 event[TimelineModel.TimelineData._symbol] = data;
1808 } 1808 }
1809 return data; 1809 return data;
1810 } 1810 }
1811 }; 1811 };
1812 1812
1813 TimelineModel.TimelineData._symbol = Symbol('timelineData'); 1813 TimelineModel.TimelineData._symbol = Symbol('timelineData');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698