Missing integration change for filterState
Background
adblockpluscore#167 moved the filter state to a global map and change the events.
Not all the changes haven't been integrated when doing the dependency update #203 (closed) (which is for 3.9)
the
filter.disabled
,filter.hitCount
, andfilter.lastHit
events emitted byfilterNotifier
are now replaced withfilterState.enabled
(note: notdisabled
),filterState.hitCount
, andfilterState.lastHit
and include the filter text rather than the filter object.
What to change
-
lib/csp.js
should emitfilterState.hitCount
instead offilter.hitCount
by just callingrecordBlockedRequest()
. -
lib/filterConfiguration.js
is settingfilter.disabled
. It should usefilterState.setEnabled()
instead.
Hint for testers
- CSP filter blocking were not reported. (allowing filters were)
- The issue reporter is the only place that trigger one of the code path
lib/filterConfiguration.js
- Toggling a filter "enabled" in the UI trigger the other code path in
lib/filterConfiguration.js
(for these last two I'm not sure how to test, but I checked in the debugger that it set the state as expected)
Edited by Hubert Figuière