Opened 6 months ago

Last modified 4 months ago

#6858 new defect

User-defined comment filters always end up in a new SpecialSubscription object

Reported by: mjethani Assignee: jsonesen
Priority: P4 Milestone:
Module: Core Keywords:
Cc: kzar, jsonesen Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by mjethani)

Environment

Adblock Plus browser extension as of ​changeset a87d009836da

How to reproduce

  1. Do a fresh install of the web extension
  2. On the options page, add a new comment filter !foo and save the changes
  3. Add another comment filter !bar and save the changes
  4. Take a heap snapshot and examine the number of SpecialSubscription objects

Observed behaviour

There are two SpecialSubscription objects with one comment filter each.

Expected behaviour

There should be only one SpecialSubscription object and both filters should be in the same object.

Additional notes

This happens because SpecialSubscription.defaultsMap does not contain an entry for CommentFilter but the newly created SpecialSubscription object for the filter is still assigned a defaults value of ["blocking"], which causes FilterStorage.getGroupForFilter to return null for every new comment filter that is added.

Also see discussion in ##6859.

Change History (8)

comment:1 Changed 6 months ago by mjethani

  • Cc jsonesen added
  • Description modified (diff)
  • Ready unset

comment:2 Changed 6 months ago by jsonesen

  • Owner set to jsonesen

comment:3 Changed 6 months ago by mjethani

  • Description modified (diff)

comment:4 Changed 5 months ago by mjethani

  • Description modified (diff)

comment:5 Changed 5 months ago by jsonesen

  • Review URL(s) modified (diff)

comment:6 Changed 5 months ago by mjethani

  • Review URL(s) modified (diff)

comment:7 follow-up: Changed 5 months ago by mjethani

Jon, you added to review URL (hehe): "Are you still able to reproduce this? I am having trouble doing so on the current master bookmark of the abpchrome repo."

Let me check, but I'd be surprised if anything had changed.

comment:8 in reply to: ↑ 7 Changed 4 months ago by mjethani

Replying to mjethani:

Jon, you added to review URL (hehe): "Are you still able to reproduce this? I am having trouble doing so on the current master bookmark of the abpchrome repo."

Let me check, but I'd be surprised if anything had changed.

If I follow the exact steps as given in the issue description, I am able to reproduce the issue exactly as described. This is with the current master branch of adblockpluschrome.

Note: See TracTickets for help on using tickets.