Closed
Bug 1408099
Opened 7 years ago
Closed 7 years ago
browserSettings.homepageOverride.get throws an exception if the home page has never been overridden
Categories
(WebExtensions :: General, defect, P1)
WebExtensions
General
Tracking
(firefox57 wontfix, firefox58 fixed)
RESOLVED
FIXED
mozilla58
People
(Reporter: bsilverberg, Assigned: bsilverberg)
References
Details
Attachments
(1 file)
There's a bug in the code for getLevelOfControl in the ExtensionPreferencesManager (EPM) that will throw an exception if it is called before a corresponding setting has been added to the EPM. In the case of browserSettings.homepageOverride, an extension could call this method, but if no installed extensions ever touched the home page via chrome_settings_overrides.homepage, then the EPM won't know about the setting and it will throw an exception. This is a simple fix to the getLevelOfControl function in the EPM, although based on a separate conversation in IRC it sounds like we might be able to entirely remove the getLevelOfControl function from the EPM as it's only there to support reporting about locked prefs, which I think we have decided we do not want to support. This needs to be fixed, regardless of the implementation.
Assignee | ||
Comment 1•7 years ago
|
||
The feature containing this bug landed in 57. I'm not sure how critical a bug this is, and whether a fix qualifies for uplift, so flagging it for tracking 57.
status-firefox57:
--- → affected
tracking-firefox57:
--- → ?
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → bob.silverberg
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 4•7 years ago
|
||
Bob: Who would be a good person to assess the criticality? Also if it just throws an exception it sounds like something we could live with for 57.
Flags: needinfo?(bob.silverberg)
Assignee | ||
Comment 5•7 years ago
|
||
(In reply to Marcia Knous [:marcia - use ni] from comment #4) > Bob: Who would be a good person to assess the criticality? Also if it just > throws an exception it sounds like something we could live with for 57. I think andym would be the person to decide. If we do not fix this then one particular API, browserSettings.homepageOverride.get() will throw an exception rather than returning the expected information, in certain situations. It doesn't seem that critical to me, but I wanted to raise it for someone to assess.
Flags: needinfo?(bob.silverberg) → needinfo?(amckay)
Comment 6•7 years ago
|
||
Agree with Bob. This is a new API. I'd be surprised if there are any developers using it, and if they do they can catch the error. Let's not uplift.
Flags: needinfo?(amckay)
Updated•7 years ago
|
tracking-firefox57:
? → ---
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8918011 [details] Bug 1408099 - Fix ExtensionPreferencesManager.getLevelOfControl to deal with undefined settings, https://reviewboard.mozilla.org/r/188892/#review194602
Attachment #8918011 -
Flags: review?(aswan) → review+
Pushed by bsilverberg@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/247bb54b615f Fix ExtensionPreferencesManager.getLevelOfControl to deal with undefined settings, r=aswan
Comment 9•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/247bb54b615f
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Comment 10•7 years ago
|
||
If wontfix in 57, The following compatibility should be changed. https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/browserSettings/homepageOverride
Comment 12•7 years ago
|
||
Is manual testing required on this bug? If Yes, please provide some STR and the proper webextension(if required), if No set the “qe-verify-“ flag.
Flags: needinfo?(bob.silverberg)
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(bob.silverberg) → qe-verify-
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•