mirror of https://github.com/gorhill/uBlock.git
Code review related to the early blocking of network requests at launch
This commit is contained in:
parent
fe595bb2b9
commit
be9e7fd11c
|
@ -170,8 +170,8 @@ vAPI.net.onBeforeReady = (function() {
|
|||
stop: function(resolver) {
|
||||
if ( pendings === undefined ) { return; }
|
||||
for ( const pending of pendings ) {
|
||||
const result = resolver(pending.details);
|
||||
pending.resolve(result);
|
||||
vAPI.net.normalizeDetails(pending.details);
|
||||
pending.resolve(resolver(pending.details));
|
||||
}
|
||||
pendings = undefined;
|
||||
},
|
||||
|
|
|
@ -46,13 +46,11 @@
|
|||
|
||||
µBlock.FilteringContext.prototype = {
|
||||
fromTabId: function(tabId) {
|
||||
if ( tabId !== -1 || tabId !== this.tabId ) {
|
||||
const tabContext = µBlock.tabContextManager.mustLookup(tabId);
|
||||
this.tabOrigin = tabContext.origin;
|
||||
this.tabHostname = tabContext.rootHostname;
|
||||
this.tabDomain = tabContext.rootDomain;
|
||||
this.tabId = tabId;
|
||||
}
|
||||
this.tabId = tabContext.tabId;
|
||||
return this;
|
||||
},
|
||||
fromWebrequestDetails: function(details) {
|
||||
|
|
Loading…
Reference in New Issue