diff options
author | hackademix | 2018-08-18 03:16:54 +0200 |
---|---|---|
committer | hackademix | 2018-08-18 03:20:33 +0200 |
commit | 2f9c5299afe0d612deff7f89c948bb44332f2abf (patch) | |
tree | 343fe4435bef995b4029656563ce6194829ea641 /src/bg/deferWebTraffic.js | |
parent | e959accb70ea00f99fa611c9f1af40e1be5bde92 (diff) | |
download | noscript-2f9c5299afe0d612deff7f89c948bb44332f2abf.tar.gz noscript-2f9c5299afe0d612deff7f89c948bb44332f2abf.tar.xz noscript-2f9c5299afe0d612deff7f89c948bb44332f2abf.zip |
Removed all references to RequestUtil.js and dependancies.
Diffstat (limited to 'src/bg/deferWebTraffic.js')
-rw-r--r-- | src/bg/deferWebTraffic.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/bg/deferWebTraffic.js b/src/bg/deferWebTraffic.js index fced870..15d177b 100644 --- a/src/bg/deferWebTraffic.js +++ b/src/bg/deferWebTraffic.js @@ -34,16 +34,20 @@ function deferWebTraffic(promiseToWaitFor, next) { if (frameId !== 0) { documentUrl = request.frameAncestors.pop().url; } - reloadTab(tabId); + if (tabId !== -1) { + reloadTab(tabId); + } else { + debug("No tab to reload for %s %s from %s", type, url, documentUrl); + } } } - debug("Deferring ", url, type); + debug("Deferring %s %s from %s", type, url, documentUrl); try { await promiseToWaitFor; } catch (e) { error(e); } - debug("Green light to ", url, type); + debug("Green light to %s %s from %s", type, url, documentUrl); } function spyTabs(request) { |