It should return already_AddRefed<nsIFocusController>.
Priority: -- → P3
Summary: GetFocusControllerForDocument should not return raw addrefed ptr → [FIX]GetFocusControllerForDocument should not return raw addrefed ptr
Target Milestone: --- → mozilla1.5alpha
Comment on attachment 126803 [details] [diff] [review] Proposed change r/sr=me
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?
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....
I see, thanks.
You need to log in before you can comment on or make changes to this bug.