Skip to content

Custom filter table uses removed function

Steps to reproduce

  1. Open Advanced tab in options page
  2. Add a custom filter "foo"
  3. Add a custom filter "bar"
  4. Reload page

Observed behavior

  • After 2) List contains filter "foo"
  • After 3) List contains filter "foo"
  • After 4) List contains no filters

Error shown in background page console:

Error in event handler for runtime.onMessage: TypeError: defaultMatcher.isSlowFilter is not a function
    at convertFilter (chrome-extension://gnnljefnoefpefgoofnoicjephgfpamm/lib/adblockplus.js:13110:34)
    at convertSubscription (chrome-extension://gnnljefnoefpefgoofnoicjephgfpamm/lib/adblockplus.js:13094:27)
    at port.on (chrome-extension://gnnljefnoefpefgoofnoicjephgfpamm/lib/adblockplus.js:13500:28)
    at Port._onMessage (chrome-extension://gnnljefnoefpefgoofnoicjephgfpamm/lib/adblockplus.js:4512:22)
    at ext._EventTarget._dispatch (chrome-extension://gnnljefnoefpefgoofnoicjephgfpamm/ext/common.js:41:22)
    at browser.runtime.onMessage.addListener (chrome-extension://gnnljefnoefpefgoofnoicjephgfpamm/ext/background.js:534:26)
    at wrapper (chrome-extension://gnnljefnoefpefgoofnoicjephgfpamm/polyfill.js:152:20)

Expected behavior

  • After 2) List contains filter "foo"
  • After 3) List contains filters "foo" and "bar"
  • After 4) List contains filters "foo" and "bar"

No error shown in background page console.

Further information

The defaultMatcher.isSlowFilter() function was removed in trac#6992 which landed in WebExt in trac#7054.

What to change

Following the integration notes, we need to switch to using the module's global isSlowFilter() function.

Edited by Luiza Ursachi
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information