mirror of https://github.com/gorhill/uBlock.git
this fixes #1134
This commit is contained in:
parent
99a0d28c98
commit
cd76d79110
|
@ -321,7 +321,11 @@ var is3rdParty = function(srcHostname, desHostname) {
|
||||||
}
|
}
|
||||||
var srcDomain = domainFromHostname(srcHostname);
|
var srcDomain = domainFromHostname(srcHostname);
|
||||||
if ( srcDomain === '' ) {
|
if ( srcDomain === '' ) {
|
||||||
srcDomain = desHostname;
|
if ( srcHostname !== '' ) {
|
||||||
|
srcDomain = srcHostname;
|
||||||
|
} else {
|
||||||
|
srcDomain = desHostname;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ( desHostname.slice(0 - srcDomain.length) !== srcDomain ) {
|
if ( desHostname.slice(0 - srcDomain.length) !== srcDomain ) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -384,8 +384,8 @@ NetFilteringResultCache.prototype.pruneAsyncCallback = function() {
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
NetFilteringResultCache.prototype.lookup = function(url) {
|
NetFilteringResultCache.prototype.lookup = function(context) {
|
||||||
return this.urls[url];
|
return this.urls[context.requestType + ' ' + context.requestURL];
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
@ -645,7 +645,7 @@ PageStore.prototype.filterRequest = function(context) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
var entry = this.netFilteringCache.lookup(context.requestURL);
|
var entry = this.netFilteringCache.lookup(context);
|
||||||
if ( entry !== undefined ) {
|
if ( entry !== undefined ) {
|
||||||
//console.debug('cache HIT: PageStore.filterRequest("%s")', context.requestURL);
|
//console.debug('cache HIT: PageStore.filterRequest("%s")', context.requestURL);
|
||||||
return entry.result;
|
return entry.result;
|
||||||
|
|
Loading…
Reference in New Issue