Do not fail when onHeadersProcessed is called with no stored pending request.
This commit is contained in:
parent
c2067c0509
commit
483fad9b8a
|
@ -369,12 +369,19 @@ var RequestGuard = (() => {
|
|||
|
||||
// check for duplicate calls
|
||||
let pending = pendingRequests.get(request.requestId);
|
||||
if (pending && pending.headersProcessed) {
|
||||
debug("[WARNING] already processed ", request);
|
||||
if (pending) {
|
||||
if (pending.headersProcessed) {
|
||||
debug("[WARNING] already processed ", request);
|
||||
} else {
|
||||
debug("onHeadersReceived", request);
|
||||
}
|
||||
} else {
|
||||
debug("[WARNING] no pending information for ", request);
|
||||
initPendingRequest(request);
|
||||
pending = pendingRequests.get(request.requestId);
|
||||
}
|
||||
pending.headersProcessed = true;
|
||||
|
||||
debug("onHeadersReceived", request);
|
||||
let {url, documentUrl, statusCode, tabId, responseHeaders} = request;
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue