OLD | NEW |
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 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 networkRequests() { | 1001 networkRequests() { |
1002 /** @type {!Map<string,!TimelineModel.TimelineModel.NetworkRequest>} */ | 1002 /** @type {!Map<string,!TimelineModel.TimelineModel.NetworkRequest>} */ |
1003 var requests = new Map(); | 1003 var requests = new Map(); |
1004 /** @type {!Array<!TimelineModel.TimelineModel.NetworkRequest>} */ | 1004 /** @type {!Array<!TimelineModel.TimelineModel.NetworkRequest>} */ |
1005 var requestsList = []; | 1005 var requestsList = []; |
1006 /** @type {!Array<!TimelineModel.TimelineModel.NetworkRequest>} */ | 1006 /** @type {!Array<!TimelineModel.TimelineModel.NetworkRequest>} */ |
1007 var zeroStartRequestsList = []; | 1007 var zeroStartRequestsList = []; |
1008 var types = TimelineModel.TimelineModel.RecordType; | 1008 var types = TimelineModel.TimelineModel.RecordType; |
1009 var resourceTypes = new Set( | 1009 var resourceTypes = new Set( |
1010 [types.ResourceSendRequest, types.ResourceReceiveResponse, types.Resourc
eReceivedData, types.ResourceFinish]); | 1010 [types.ResourceSendRequest, types.ResourceReceiveResponse, types.Resourc
eReceivedData, types.ResourceFinish]); |
1011 var events = this.mainThreadEvents(); | 1011 var events = this.inspectedTargetEvents(); |
1012 for (var i = 0; i < events.length; ++i) { | 1012 for (var i = 0; i < events.length; ++i) { |
1013 var e = events[i]; | 1013 var e = events[i]; |
1014 if (!resourceTypes.has(e.name)) | 1014 if (!resourceTypes.has(e.name)) |
1015 continue; | 1015 continue; |
1016 var id = TimelineModel.TimelineModel.globalEventId(e, 'requestId'); | 1016 var id = TimelineModel.TimelineModel.globalEventId(e, 'requestId'); |
1017 var request = requests.get(id); | 1017 var request = requests.get(id); |
1018 if (request) { | 1018 if (request) { |
1019 request.addEvent(e); | 1019 request.addEvent(e); |
1020 } else { | 1020 } else { |
1021 request = new TimelineModel.TimelineModel.NetworkRequest(e); | 1021 request = new TimelineModel.TimelineModel.NetworkRequest(e); |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1797 var data = event[TimelineModel.TimelineData._symbol]; | 1797 var data = event[TimelineModel.TimelineData._symbol]; |
1798 if (!data) { | 1798 if (!data) { |
1799 data = new TimelineModel.TimelineData(); | 1799 data = new TimelineModel.TimelineData(); |
1800 event[TimelineModel.TimelineData._symbol] = data; | 1800 event[TimelineModel.TimelineData._symbol] = data; |
1801 } | 1801 } |
1802 return data; | 1802 return data; |
1803 } | 1803 } |
1804 }; | 1804 }; |
1805 | 1805 |
1806 TimelineModel.TimelineData._symbol = Symbol('timelineData'); | 1806 TimelineModel.TimelineData._symbol = Symbol('timelineData'); |
OLD | NEW |