ContactManager init method should return a non-XPCOM object

RESOLVED WORKSFORME

Status

()

Core
DOM: Contacts
RESOLVED WORKSFORME
5 years ago
4 years ago

People

(Reporter: ggp, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
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 anything 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.
(Reporter)

Comment 1

5 years ago
Sorry, the description above should read "...and note that returning _nothing_ from init() also causes...". So returning undefined is also a problem.
Component: General → DOM: Device Interfaces
Hardware: x86 → All
Version: unspecified → Trunk
Fixed by bug 850430.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Component: DOM: Device Interfaces → DOM: Contacts
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.