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

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

Issue 2620463002: Show service worker navigation preload requests in DevTools Network tab (Closed)
Patch Set: fix crash Created 3 years, 11 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 var topFrame = stack.callFrames.length ? stack.callFrames[0] : null; 138 var topFrame = stack.callFrames.length ? stack.callFrames[0] : null;
139 if (!topFrame) 139 if (!topFrame)
140 continue; 140 continue;
141 type = SDK.NetworkRequest.InitiatorType.Script; 141 type = SDK.NetworkRequest.InitiatorType.Script;
142 url = topFrame.url || Common.UIString('<anonymous>'); 142 url = topFrame.url || Common.UIString('<anonymous>');
143 lineNumber = topFrame.lineNumber; 143 lineNumber = topFrame.lineNumber;
144 columnNumber = topFrame.columnNumber; 144 columnNumber = topFrame.columnNumber;
145 scriptId = topFrame.scriptId; 145 scriptId = topFrame.scriptId;
146 break; 146 break;
147 } 147 }
148 } else if (initiator.type === Protocol.Network.InitiatorType.Preload) {
149 type = SDK.NetworkRequest.InitiatorType.Preload;
148 } 150 }
149 } 151 }
150 152
151 request[SDK.NetworkLog._initiatorDataSymbol].info = 153 request[SDK.NetworkLog._initiatorDataSymbol].info =
152 {type: type, url: url, lineNumber: lineNumber, columnNumber: columnNumbe r, scriptId: scriptId}; 154 {type: type, url: url, lineNumber: lineNumber, columnNumber: columnNumbe r, scriptId: scriptId};
153 return request[SDK.NetworkLog._initiatorDataSymbol].info; 155 return request[SDK.NetworkLog._initiatorDataSymbol].info;
154 } 156 }
155 157
156 /** 158 /**
157 * @param {!SDK.NetworkRequest} request 159 * @param {!SDK.NetworkRequest} request
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 SDK.PageLoad._lastIdentifier = 0; 319 SDK.PageLoad._lastIdentifier = 0;
318 320
319 /** @typedef {!{initiators: !Set<!SDK.NetworkRequest>, initiated: !Set<!SDK.Netw orkRequest>}} */ 321 /** @typedef {!{initiators: !Set<!SDK.NetworkRequest>, initiated: !Set<!SDK.Netw orkRequest>}} */
320 SDK.NetworkLog.InitiatorGraph; 322 SDK.NetworkLog.InitiatorGraph;
321 323
322 /** @typedef {!{type: !SDK.NetworkRequest.InitiatorType, url: string, lineNumber : number, columnNumber: number, scriptId: ?string}} */ 324 /** @typedef {!{type: !SDK.NetworkRequest.InitiatorType, url: string, lineNumber : number, columnNumber: number, scriptId: ?string}} */
323 SDK.NetworkLog._InitiatorInfo; 325 SDK.NetworkLog._InitiatorInfo;
324 326
325 SDK.NetworkLog._initiatorDataSymbol = Symbol('InitiatorData'); 327 SDK.NetworkLog._initiatorDataSymbol = Symbol('InitiatorData');
326 SDK.NetworkLog._pageLoadForRequestSymbol = Symbol('PageLoadForRequest'); 328 SDK.NetworkLog._pageLoadForRequestSymbol = Symbol('PageLoadForRequest');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698