From 9ceef65f9ae6e7dd484415f474203a1aae4bd1f7 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 17 Aug 2021 07:32:54 -0400 Subject: [PATCH] Fix regression with reporting "important" in logger Related feedback: - https://github.com/gorhill/uBlock/commit/a2a8ef7e851471b3902ff1606f9266bfd93669ed#commitcomment-54972030 --- src/js/static-net-filtering.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index e19edbcfb..b67213ff1 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -297,6 +297,9 @@ class LogData { isRegex: false, }; filterUnits[iunit].logData(logData); + if ( (categoryBits & Important) !== 0 ) { + logData.options.unshift('important'); + } if ( (categoryBits & ThirdParty) !== 0 ) { logData.options.unshift('3p'); } else if ( (categoryBits & FirstParty) !== 0 ) { @@ -3477,7 +3480,7 @@ class FilterCompiler { // the block-important realm should be checked when and only when // there is a matched exception filter, which important filters are // meant to override. - if ( (this.action & BlockImportant) !== 0 ) { + if ( (this.action & ActionBitsMask) === BlockImportant ) { this.action &= ~Important; units.push(FilterImportant.compile()); this.compileToAtomicFilter(