Closed Bug 854600 Opened 11 years ago Closed 10 years ago

PermissionSettings' init method should return a non-XPCOM object

Categories

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

x86
All
defect
Not set
normal

Tracking

()

RESOLVED INVALID
2.1 S1 (1aug)

People

(Reporter: ggp, Unassigned)

References

Details

(Whiteboard: [systemsfe][priority])

Attachments

(1 file)

The object returned from init() in an implementation of nsIDOMGlobalPropertyInitializer should be a different object implementing only the API to be exposed, and nothing more.

If the XPCOM object itself is returned -- and note that returning nothing from init() also causes the XPCOM object to be used --  it is possible to QI into that object and, for example, call init() again, which might not be safe.
Assignee: nobody → reuben.bmo
Status: NEW → ASSIGNED
Attachment #8382600 - Flags: review?(anygregor)
Depends on bug 971766 for the pref to ignore app type checks.
Depends on: 971766
Comment on attachment 8382600 [details] [diff] [review]
Move PermissionSettings to WebIDL

Review of attachment 8382600 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/permission/PermissionPromptService.js
@@ -28,5 @@
>  
> -XPCOMUtils.defineLazyServiceGetter(this,
> -                                   "PermSettings",
> -                                   "@mozilla.org/permissionSettings;1",
> -                                   "nsIDOMPermissionSettings");

Also remove from http://mxr.mozilla.org/mozilla-central/source/b2g/components/ContentPermissionPrompt.js#38
Attachment #8382600 - Flags: review?(anygregor) → review+
Target Milestone: --- → 1.4 S2 (28feb)
Whiteboard: [systemsfe]
Target Milestone: 1.4 S2 (28feb) → 1.4 S3 (14mar)
Don't forget to fix and land.
Flags: needinfo?(reuben.bmo)
Target Milestone: 1.4 S3 (14mar) → 1.4 S4 (28mar)
Reuben, are you ready to land this?
I need to address the review comments in bug 971766, land it, and then I can land this.
Flags: needinfo?(reuben.bmo)
And to address those review comments, I need bug 952486. Michael, I think you should go ahead and change the XPIDL if you need to land a change to PermissionSettings soon.
Whiteboard: [systemsfe] → [systemsfe][priority]
Target Milestone: 1.4 S4 (28mar) → 1.4 S5 (11apr)
Target Milestone: 1.4 S5 (11apr) → 1.4 S6 (25apr)
Target Milestone: 1.4 S6 (25apr) → 2.0 S1 (9may)
Target Milestone: 2.0 S1 (9may) → 2.0 S2 (23may)
Target Milestone: 2.0 S2 (23may) → 2.0 S3 (6june)
Target Milestone: 2.0 S3 (6june) → 2.0 S4 (20june)
Target Milestone: 2.0 S4 (20june) → 2.0 S5 (4july)
Target Milestone: 2.0 S5 (4july) → 2.0 S6 (18july)
Target Milestone: 2.0 S6 (18july) → 2.1 S1 (1aug)
Fixed by bug 985796.
Assignee: reuben.bmo → nobody
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: