Closed
Bug 357616
Opened 19 years ago
Closed 19 years ago
Remove remaining traces of nsIPref from widget/
Categories
(Core :: Widget, defect)
Core
Widget
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: Biesinger, Assigned: Biesinger)
References
Details
Attachments
(1 file, 1 obsolete file)
|
18.46 KB,
patch
|
Details | Diff | Splinter Review |
Even after bug 281298, there are still a few occurrences of nsIPref in widget.
| Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha
| Assignee | ||
Comment 1•19 years ago
|
||
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
| Assignee | ||
Comment 4•19 years ago
|
||
check for OOM and move observer creation out of the for loop.
Attachment #243125 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•19 years ago
|
||
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.
Description
•