Open Bug 859878 Opened 11 years ago Updated 2 years ago

Add permissions manager support to JS-implemented WebIDL on navigator

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

People

(Reporter: mccr8, Unassigned)

References

(Blocks 1 open bug)

Details

Many existing DOM things implemented in JS on navigator (MozKeyboard, DOMFMRadioChild, NetworkStatsManager, SettingsManager, AlarmsManager, PermissionSettings, Push) check with the permissions manager and just set null if the check fails.  The existing code does this by having init() in the implementation of nsIDOMGlobalPropertyInitializer return null, but this could also be implemented in WebIDL, being declared with some kind of extended attribute on the object.
We have to change this behavior now. Marketplace wants 'undefined' if it's not supported by the platform and 'null' if the permissions are not sufficient. Check out my patch in bug 859601.
That could be easily supported, too.  Though I suppose one argument against baking this into WebIDL is that changes like this would then require codegen hacking rather than just writing some more JS.  Then again, you could also change everything that used this in one go instead of having to track down a dozen different implementations and fix them.
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.