mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
Fix block filter reported in the logger despite being excepted
Reported internally by @uBlock-user. Also, fixed broken caching of `cname` exception, which forced uBO to repeatedly evaluate whether a `cname` exception exists when a block `cname`-cloaked request is encountered.
This commit is contained in:
parent
a440bcbc46
commit
3ff6617ea3
@ -377,7 +377,9 @@ const PageStore = class {
|
||||
setFrameURL(frameId, frameURL) {
|
||||
let frameStore = this.frames.get(frameId);
|
||||
if ( frameStore !== undefined ) {
|
||||
frameStore.init(frameURL);
|
||||
if ( frameURL !== frameStore.rawURL ) {
|
||||
frameStore.init(frameURL);
|
||||
}
|
||||
} else {
|
||||
frameStore = FrameStore.factory(frameURL);
|
||||
this.frames.set(frameId, frameStore);
|
||||
@ -613,7 +615,7 @@ const PageStore = class {
|
||||
result = snfe.matchString(fctxt);
|
||||
if ( result !== 0 ) {
|
||||
if ( loggerEnabled ) {
|
||||
fctxt.filter = snfe.toLogData();
|
||||
fctxt.setFilter(snfe.toLogData());
|
||||
}
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/943
|
||||
// Blanket-except blocked aliased canonical hostnames?
|
||||
@ -872,20 +874,16 @@ const PageStore = class {
|
||||
? frameStore.rawURL
|
||||
: fctxt.getDocOrigin()
|
||||
);
|
||||
if ( result === 2 ) {
|
||||
exceptCname = µb.logger.enabled
|
||||
? µb.staticNetFilteringEngine.toLogData()
|
||||
: true;
|
||||
} else {
|
||||
exceptCname = false;
|
||||
}
|
||||
exceptCname = result === 2
|
||||
? µb.staticNetFilteringEngine.toLogData()
|
||||
: false;
|
||||
if ( frameStore instanceof Object ) {
|
||||
frameStore.exceptCname = exceptCname;
|
||||
}
|
||||
}
|
||||
if ( exceptCname === false ) { return false; }
|
||||
if ( exceptCname instanceof Object ) {
|
||||
fctxt.pushFilter(exceptCname);
|
||||
fctxt.setFilter(exceptCname);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user