mirror of https://github.com/gorhill/uBlock.git
Use "constant" property for target hntrie container
This commit is contained in:
parent
8f66de67e1
commit
4157171b7f
|
@ -1736,10 +1736,6 @@ class FilterDomainHitSet {
|
||||||
// - from=
|
// - from=
|
||||||
|
|
||||||
class FilterFromDomainHit extends FilterDomainHit {
|
class FilterFromDomainHit extends FilterDomainHit {
|
||||||
static get hntrieContainer() {
|
|
||||||
return origHNTrieContainer;
|
|
||||||
}
|
|
||||||
|
|
||||||
static hasOriginHit() {
|
static hasOriginHit() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1756,6 +1752,9 @@ class FilterFromDomainHit extends FilterDomainHit {
|
||||||
details.fromDomains.push(this.getDomainOpt(idata));
|
details.fromDomains.push(this.getDomainOpt(idata));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Object.defineProperty(FilterFromDomainHit, 'hntrieContainer', {
|
||||||
|
value: origHNTrieContainer
|
||||||
|
});
|
||||||
|
|
||||||
class FilterFromDomainMiss extends FilterFromDomainHit {
|
class FilterFromDomainMiss extends FilterFromDomainHit {
|
||||||
static hasOriginHit() {
|
static hasOriginHit() {
|
||||||
|
@ -1788,10 +1787,6 @@ class FilterFromEntityMiss extends FilterFromDomainMiss {
|
||||||
}
|
}
|
||||||
|
|
||||||
class FilterFromDomainHitSet extends FilterDomainHitSet {
|
class FilterFromDomainHitSet extends FilterDomainHitSet {
|
||||||
static get hntrieContainer() {
|
|
||||||
return origHNTrieContainer;
|
|
||||||
}
|
|
||||||
|
|
||||||
static hasOriginHit() {
|
static hasOriginHit() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1810,6 +1805,9 @@ class FilterFromDomainHitSet extends FilterDomainHitSet {
|
||||||
details.fromDomains.push(this.getDomainOpt(idata));
|
details.fromDomains.push(this.getDomainOpt(idata));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Object.defineProperty(FilterFromDomainHitSet, 'hntrieContainer', {
|
||||||
|
value: origHNTrieContainer
|
||||||
|
});
|
||||||
|
|
||||||
class FilterFromDomainMissSet extends FilterFromDomainHitSet {
|
class FilterFromDomainMissSet extends FilterFromDomainHitSet {
|
||||||
static hasOriginHit() {
|
static hasOriginHit() {
|
||||||
|
@ -1855,10 +1853,6 @@ const compileFromDomainOpt = (...args) => {
|
||||||
// - to=
|
// - to=
|
||||||
|
|
||||||
class FilterToDomainHit extends FilterDomainHit {
|
class FilterToDomainHit extends FilterDomainHit {
|
||||||
static get hntrieContainer() {
|
|
||||||
return destHNTrieContainer;
|
|
||||||
}
|
|
||||||
|
|
||||||
static getMatchTarget() {
|
static getMatchTarget() {
|
||||||
return $requestHostname;
|
return $requestHostname;
|
||||||
}
|
}
|
||||||
|
@ -1871,6 +1865,9 @@ class FilterToDomainHit extends FilterDomainHit {
|
||||||
details.toDomains.push(this.getDomainOpt(idata));
|
details.toDomains.push(this.getDomainOpt(idata));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Object.defineProperty(FilterToDomainHit, 'hntrieContainer', {
|
||||||
|
value: destHNTrieContainer
|
||||||
|
});
|
||||||
|
|
||||||
class FilterToDomainMiss extends FilterToDomainHit {
|
class FilterToDomainMiss extends FilterToDomainHit {
|
||||||
static get dnrConditionName() {
|
static get dnrConditionName() {
|
||||||
|
@ -1899,10 +1896,6 @@ class FilterToEntityMiss extends FilterToDomainMiss {
|
||||||
}
|
}
|
||||||
|
|
||||||
class FilterToDomainHitSet extends FilterDomainHitSet {
|
class FilterToDomainHitSet extends FilterDomainHitSet {
|
||||||
static get hntrieContainer() {
|
|
||||||
return destHNTrieContainer;
|
|
||||||
}
|
|
||||||
|
|
||||||
static getMatchTarget(which) {
|
static getMatchTarget(which) {
|
||||||
return (which & 0b01) !== 0
|
return (which & 0b01) !== 0
|
||||||
? $requestHostname
|
? $requestHostname
|
||||||
|
@ -1917,6 +1910,9 @@ class FilterToDomainHitSet extends FilterDomainHitSet {
|
||||||
details.toDomains.push(this.getDomainOpt(idata));
|
details.toDomains.push(this.getDomainOpt(idata));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Object.defineProperty(FilterToDomainHitSet, 'hntrieContainer', {
|
||||||
|
value: destHNTrieContainer
|
||||||
|
});
|
||||||
|
|
||||||
class FilterToDomainMissSet extends FilterToDomainHitSet {
|
class FilterToDomainMissSet extends FilterToDomainHitSet {
|
||||||
static match(idata) {
|
static match(idata) {
|
||||||
|
|
Loading…
Reference in New Issue