Closed
Bug 675267
Opened 12 years ago
Closed 12 years ago
Remove unnecessary target arguments from some event listener manager apis
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
25.68 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
As far as I can tell, all the callers pass exactly what we have in mTarget.
![]() |
Assignee | |
Updated•12 years ago
|
Summary: Remove unnecessary target attributes from some event listener manager apis → Remove unnecessary target arguments from some event listener manager apis
![]() |
Assignee | |
Comment 1•12 years ago
|
||
Try run is http://tbpl.mozilla.org/?tree=Try&rev=b683e4a9e6bf and looks good
Attachment #549425 -
Flags: review?(Olli.Pettay)
Comment 2•12 years ago
|
||
Comment on attachment 549425 [details] [diff] [review] Fix > if (document && > (win = document->GetInnerWindow()) && win->IsInnerWindow()) { > nsCOMPtr<nsIDOMEventTarget> piTarget(do_QueryInterface(win)); >- NS_ENSURE_TRUE(piTarget, NS_ERROR_FAILURE); >- >- *aManager = piTarget->GetListenerManager(PR_TRUE); >- >- if (*aManager) { >- NS_ADDREF(*aTarget = win); >- NS_ADDREF(*aManager); >- } >- *aDefer = PR_FALSE; >- } else { >- *aManager = nsnull; >- *aTarget = nsnull; >- *aDefer = PR_FALSE; >+ NS_ENSURE_TRUE(piTarget, nsnull); You could just drop NS_ENSURE_TRUE. If nsPIDOMWindow doesn't implement nsIDOMEventTarget, something is badly wrong and it is ok to crash, IMO.
Attachment #549425 -
Flags: review?(Olli.Pettay) → review+
![]() |
Assignee | |
Comment 4•12 years ago
|
||
http://hg.mozilla.org/integration/mozilla-inbound/rev/c5defc500925
Flags: in-testsuite-
Whiteboard: [need landing]
Target Milestone: --- → mozilla8
Comment 5•12 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/c5defc500925
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•