Closed Bug 1377538 Opened 8 years ago Closed 8 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
Performance Impact ?
Tracking Status
firefox56 --- fixed

People

(Reporter: florian, Assigned: kmag)

References

(Blocks 2 open bugs)

Details

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.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Whiteboard: [qf]
Performance Impact: --- → ?
Whiteboard: [qf]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: