The blocklistState property should be saved in the add-ons database

RESOLVED FIXED in Firefox 56

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: florian, Assigned: kmag)

Tracking

(Blocks 2 bugs)

unspecified
mozilla56
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox56 fixed)

Details

(Whiteboard: [qf])

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Currently accessing .blocklistState triggers a load of the whole blocklist, as seen in bug 1358907, we should store this value in the add-ons database so that accessing it becomes cheap.
(Assignee)

Updated

2 years ago
Assignee: nobody → kmaglione+bmo
Comment hidden (mozreview-request)

Comment 2

2 years ago
mozreview-review
Comment on attachment 8883142 [details]
Bug 1377538: Store blocklistState and blocklistURL in the add-ons DB.

https://reviewboard.mozilla.org/r/154082/#review159946

::: toolkit/mozapps/extensions/internal/XPIProvider.jsm:4944
(Diff revision 1)
>    },
>  
> -  get blocklistState() {
> +  findBlocklistEntry() {
>      let staticItem = findMatchingStaticBlocklistItem(this);
> -    if (staticItem)
> -      return staticItem.level;
> +    if (staticItem) {
> +      let url = Services.urlFormatter.formatURLPref("extensions.blocklist.itemURL");

I'd prefer to use a const defining prefs and not sprinkle strings throughout code.
Attachment #8883142 - Flags: review?(rhelmer) → review+
(Assignee)

Comment 3

2 years ago
mozreview-review-reply
Comment on attachment 8883142 [details]
Bug 1377538: Store blocklistState and blocklistURL in the add-ons DB.

https://reviewboard.mozilla.org/r/154082/#review159946

> I'd prefer to use a const defining prefs and not sprinkle strings throughout code.

Eh, I didn't write it, I just moved it.
(Assignee)

Comment 4

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/c772c634a9613256f4403e1388da9316a294206d
Bug 1377538: Store blocklistState and blocklistURL in the add-ons DB. r=rhelmer

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c772c634a961
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
(Assignee)

Updated

2 years ago
Whiteboard: [qf]
You need to log in before you can comment on or make changes to this bug.