Bug 987026 - Crash when adopting a focused element [@ mozilla::a11y::FocusManager::ProcessDOMFocus], r=jwei

This commit is contained in:
Alexander Surkov 2014-03-26 16:17:15 -04:00
parent 1d5f675f1b
commit 0044aa9e9b

View File

@ -240,9 +240,11 @@ FocusManager::ProcessDOMFocus(nsINode* aTarget)
DocAccessible* document =
GetAccService()->GetDocAccessible(aTarget->OwnerDoc());
if (!document)
return;
Accessible* target = document->GetAccessibleEvenIfNotInMapOrContainer(aTarget);
if (target && document) {
if (target) {
// Check if still focused. Otherwise we can end up with storing the active
// item for control that isn't focused anymore.
nsINode* focusedNode = FocusedDOMNode();