diff options
Diffstat (limited to 'dom/events/FocusEvent.cpp')
-rw-r--r-- | dom/events/FocusEvent.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dom/events/FocusEvent.cpp b/dom/events/FocusEvent.cpp index 02fce7c939..48c22d8d23 100644 --- a/dom/events/FocusEvent.cpp +++ b/dom/events/FocusEvent.cpp @@ -30,14 +30,14 @@ NS_IMETHODIMP FocusEvent::GetRelatedTarget(nsIDOMEventTarget** aRelatedTarget) { NS_ENSURE_ARG_POINTER(aRelatedTarget); - NS_IF_ADDREF(*aRelatedTarget = GetRelatedTarget()); + *aRelatedTarget = GetRelatedTarget().take(); return NS_OK; } -EventTarget* +already_AddRefed<EventTarget> FocusEvent::GetRelatedTarget() { - return mEvent->AsFocusEvent()->mRelatedTarget; + return EnsureWebAccessibleRelatedTarget(mEvent->AsFocusEvent()->mRelatedTarget); } void |