Closed Bug 211195 Opened 21 years ago Closed 21 years ago

[FIX]GetFocusControllerForDocument should not return raw addrefed ptr

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.5alpha

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

It should return already_AddRefed<nsIFocusController>.
Attached patch Proposed changeSplinter Review
Priority: -- → P3
Summary: GetFocusControllerForDocument should not return raw addrefed ptr → [FIX]GetFocusControllerForDocument should not return raw addrefed ptr
Target Milestone: --- → mozilla1.5alpha
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+
Checked in.
Status: NEW → RESOLVED
Closed: 21 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?
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....
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: