From efff57bfc92678e388208311cb14419e855b0bbf Mon Sep 17 00:00:00 2001 From: Josh McSavaney Date: Tue, 4 May 2021 17:28:37 -0400 Subject: [PATCH] Remove references to `promsises` in RequestGuard. This seems to be dead code, as `promises` is only ever instantiated as an empty list and then consumed. Nothing is ever added to it. --- src/bg/RequestGuard.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js index 76c229b..ceef33b 100644 --- a/src/bg/RequestGuard.js +++ b/src/bg/RequestGuard.js @@ -491,7 +491,6 @@ var RequestGuard = (() => { normalizeRequest(request); let result = ALLOW; - let promises = []; let headersModified = false; pending.headersProcessed = true; @@ -534,11 +533,6 @@ var RequestGuard = (() => { error(e, "Error in onHeadersReceived", request); } - promises = promises.filter(p => p instanceof Promise); - if (promises.length > 0) { - return Promise.all(promises).then(() => result); - } - return result; }, onResponseStarted(request) {