mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-03 09:39:38 +02:00
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(
|
browser.webRequest.onBeforeRequest.addListener(
|
||||||
details => {
|
details => {
|
||||||
this.normalizeDetails(details);
|
this.normalizeDetails(details);
|
||||||
if ( this.suspendDepth === 0 ) {
|
if ( this.suspendDepth === 0 || details.tabId < 0 ) {
|
||||||
if ( this.suspendableListener === undefined ) { return; }
|
if ( this.suspendableListener === undefined ) { return; }
|
||||||
return this.suspendableListener(details);
|
return this.suspendableListener(details);
|
||||||
}
|
}
|
||||||
if ( details.tabId < 0 ) { return; }
|
|
||||||
return this.suspendOneRequest(details);
|
return this.suspendOneRequest(details);
|
||||||
},
|
},
|
||||||
this.denormalizeFilters({ urls: [ 'http://*/*', 'https://*/*' ] }),
|
this.denormalizeFilters({ urls: [ 'http://*/*', 'https://*/*' ] }),
|
||||||
|
@ -115,7 +115,7 @@
|
|||||||
resolve: undefined,
|
resolve: undefined,
|
||||||
promise: undefined
|
promise: undefined
|
||||||
};
|
};
|
||||||
pending.promise = new Promise(function(resolve) {
|
pending.promise = new Promise(resolve => {
|
||||||
pending.resolve = resolve;
|
pending.resolve = resolve;
|
||||||
});
|
});
|
||||||
this.pendingRequests.push(pending);
|
this.pendingRequests.push(pending);
|
||||||
|
Loading…
Reference in New Issue
Block a user