Closed Bug 669354 Opened 14 years ago Closed 7 years ago

Suspicious code in nsPrefService's constructor and destructor

Categories

(Core :: Preferences: Backend, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: neil, Unassigned)

Details

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
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.