1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-26 12:22:50 +01:00

Code review related to the early blocking of network requests at launch

This commit is contained in:
Raymond Hill 2018-12-24 08:56:35 -05:00
parent fe595bb2b9
commit be9e7fd11c
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 7 additions and 9 deletions

View File

@ -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;
},

View File

@ -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;
}
const tabContext = µBlock.tabContextManager.mustLookup(tabId);
this.tabOrigin = tabContext.origin;
this.tabHostname = tabContext.rootHostname;
this.tabDomain = tabContext.rootDomain;
this.tabId = tabContext.tabId;
return this;
},
fromWebrequestDetails: function(details) {