Closed Bug 357616 Opened 19 years ago Closed 19 years ago

Remove remaining traces of nsIPref from widget/

Categories

(Core :: Widget, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: Biesinger, Assigned: Biesinger)

References

Details

Attachments

(1 file, 1 obsolete file)

Even after bug 281298, there are still a few occurrences of nsIPref in widget.
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha
Attached patch patch (obsolete) — Splinter Review
Attachment #243125 - Flags: superreview?(roc)
Attachment #243125 - Flags: review?(roc)
Comment on attachment 243125 [details] [diff] [review] patch + nsCOMPtr<nsIObserver> obs(new Debug_PrefObserver()); // Register callbacks for when these change - prefs->RegisterCallback(debug_PrefValues[i].name, - debug_PrefChangedCallback, - NULL); + prefs->AddObserver(debug_PrefValues[i].name, obs, PR_FALSE); Fix OOM and simplify by writing nsIObserver* obs = new Debug_PrefObserver(); if (obs) { prefs->AddObserver(debug_PrefValues[i].name, obs, PR_FALSE); }
Attachment #243125 - Flags: superreview?(roc)
Attachment #243125 - Flags: superreview+
Attachment #243125 - Flags: review?(roc)
Attachment #243125 - Flags: review+
I suppose you need to keep obs an nsCOMPtr. But do check for OOM
Attached patch patch v2Splinter Review
check for OOM and move observer creation out of the for loop.
Attachment #243125 - Attachment is obsolete: true
fixed on trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: