mirror of https://github.com/gorhill/uBlock.git
Do not bypass network listener in suspended mode
Tabless network requests were bypassing uBO's
onBeforeRequest's listener when in suspended
mode. Suspend mode occurs during the time the
filter lists are all reloaded.
Regression from:
- 1dfdc40e09 (diff-d04c15ee6bff6a6269c6aee25a7c7522R1122)
This commit is contained in:
parent
eb1ccec242
commit
35cb0eb377
|
@ -1157,11 +1157,10 @@ vAPI.Net = class {
|
|||
browser.webRequest.onBeforeRequest.addListener(
|
||||
details => {
|
||||
this.normalizeDetails(details);
|
||||
if ( this.suspendDepth === 0 ) {
|
||||
if ( this.suspendDepth === 0 || details.tabId < 0 ) {
|
||||
if ( this.suspendableListener === undefined ) { return; }
|
||||
return this.suspendableListener(details);
|
||||
}
|
||||
if ( details.tabId < 0 ) { return; }
|
||||
return this.suspendOneRequest(details);
|
||||
},
|
||||
this.denormalizeFilters({ urls: [ 'http://*/*', 'https://*/*' ] }),
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
resolve: undefined,
|
||||
promise: undefined
|
||||
};
|
||||
pending.promise = new Promise(function(resolve) {
|
||||
pending.promise = new Promise(resolve => {
|
||||
pending.resolve = resolve;
|
||||
});
|
||||
this.pendingRequests.push(pending);
|
||||
|
|
Loading…
Reference in New Issue