Suspicious code in nsPrefService's constructor and destructor

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
8 years ago
a year ago

People

(Reporter: neil, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
As a rule, XPCOM objects should not pass themselves to other objects within their constructor or destructor.

nsPrefService's constructor fiddles with refcounts to be able to add itself to the observer service. This should be done using an init method.

nsPrefService's destructor removes itself from the observer service. This is at the very least pointless.
nsPrefService no longer exists, and Preferences doesn't do any of the things mentioned in comment 0.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.