[FIX]GetFocusControllerForDocument should not return raw addrefed ptr

RESOLVED FIXED in mozilla1.5alpha

Status

()

P3
normal
RESOLVED FIXED
16 years ago
16 years ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

Trunk
mozilla1.5alpha
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

16 years ago
It should return already_AddRefed<nsIFocusController>.
(Assignee)

Comment 1

16 years ago
Created attachment 126803 [details] [diff] [review]
Proposed change
(Assignee)

Updated

16 years ago
Priority: -- → P3
Summary: GetFocusControllerForDocument should not return raw addrefed ptr → [FIX]GetFocusControllerForDocument should not return raw addrefed ptr
Target Milestone: --- → mozilla1.5alpha
(Assignee)

Updated

16 years ago
Attachment #126803 - Flags: superreview?(bryner)
Attachment #126803 - Flags: review?(bryner)
Comment on attachment 126803 [details] [diff] [review]
Proposed change

r/sr=me
Attachment #126803 - Flags: superreview?(bryner)
Attachment #126803 - Flags: superreview+
Attachment #126803 - Flags: review?(bryner)
Attachment #126803 - Flags: review+
(Assignee)

Comment 3

16 years ago
Checked in.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
For this kind of thing, why not just return a raw pointer and let the caller
addref if they want? Like we're doing with nsIFrame::GetContent() etc?
(Assignee)

Comment 5

16 years ago
In this case, that would involve calling an XPCOM getter and then releasing the
pointer it gave you before returning it, unless I also changed the nsPIDOMWindow
interface...  I could do that, I suppose, but I wasn't sure that was desired in
the first place -- jst does not seem to like things returning weak pointers much....
You need to log in before you can comment on or make changes to this bug.