Closed
Bug 1345583
Opened 7 years ago
Closed 7 years ago
Move code for startup and shutdown handling of preferences to ExtensionPreferencesManager
Categories
(WebExtensions :: General, enhancement, P1)
WebExtensions
General
Tracking
(firefox55 fixed)
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: bsilverberg, Assigned: bsilverberg)
References
Details
Attachments
(1 file)
The code that is currently in ext-privacy.js [1] for handling automatic enabling and disabling of preferences on extension startup and shutdown should be moved into ExtensionPreferencesManager.jsm. It doesn't make sense to have this code in the individual ext- files and in fact causes a problem when more than one of those files includes the code. [1] http://searchfox.org/mozilla-central/source/toolkit/components/extensions/ext-privacy.js#17-35
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8845075 [details] Bug 1345583 - Move code for startup and shutdown handling of preferences to ExtensionPreferencesManager, https://reviewboard.mozilla.org/r/118286/#review120294 This would be good to add tests for too, but getting the change in to unblock other consumers seems like a higher priority. ::: toolkit/components/extensions/ExtensionPreferencesManager.jsm:37 (Diff revision 1) > > XPCOMUtils.defineLazyGetter(this, "defaultPreferences", function() { > return new Preferences({defaultBranch: true}); > }); > > +const {Management} = Cu.import("resource://gre/modules/Extension.jsm", {}); please move this to the top of the file
Attachment #8845075 -
Flags: review?(aswan) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8845075 [details] Bug 1345583 - Move code for startup and shutdown handling of preferences to ExtensionPreferencesManager, https://reviewboard.mozilla.org/r/118286/#review120294 I wasn't that concerned about tests for this change, as it is covered by the tests for the privacy API, but I suppose it's possible for the implementation of privacy to change and leave this uncovered, so yes, it should have its own tests. I have opened https://bugzilla.mozilla.org/show_bug.cgi?id=1345847 as a follow-up.
Pushed by bsilverberg@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f12a9623b445 Move code for startup and shutdown handling of preferences to ExtensionPreferencesManager, r=aswan
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f12a9623b445
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•