Closed Bug 1377538 Opened 4 years ago Closed 4 years ago

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

Categories

(Toolkit :: Add-ons Manager, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: florian, Assigned: kmag)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [qf])

Attachments

(1 file)

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: nobody → kmaglione+bmo
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+
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.
https://hg.mozilla.org/integration/mozilla-inbound/rev/c772c634a9613256f4403e1388da9316a294206d
Bug 1377538: Store blocklistState and blocklistURL in the add-ons DB. r=rhelmer
https://hg.mozilla.org/mozilla-central/rev/c772c634a961
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Whiteboard: [qf]
You need to log in before you can comment on or make changes to this bug.