Bug 1349223 - do not assert if a document is unattached from tree when seding the events, r=jamie
authorAlexander Surkov <surkov.alexander@gmail.com>
Mon, 25 Jun 2018 13:16:43 -0400
changeset 423618 e6878a9478df963de1c0c996697c1d8242622cc6
parent 423545 27db2b2703d2a86be00bb83e8638ecc734b51a85
child 423619 4c8cb4420363029571ff80cab93b28bbe986fc72
push id34190
push userebalazs@mozilla.com
push dateTue, 26 Jun 2018 14:53:39 +0000
treeherdermozilla-central@348090c6b5c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjamie
bugs1349223
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1349223 - do not assert if a document is unattached from tree when seding the events, r=jamie
accessible/windows/msaa/AccessibleWrap.cpp
--- a/accessible/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/windows/msaa/AccessibleWrap.cpp
@@ -1333,18 +1333,23 @@ AccessibleWrap::GetHWNDFor(Accessible* a
         return hWnd;
       }
     }
 
     // Accessibles in child processes are said to have the HWND of the window
     // their tab is within.  Popups are always in the parent process, and so
     // never proxied, which means this is basically correct.
     Accessible* outerDoc = proxy->OuterDocOfRemoteBrowser();
-    NS_ASSERTION(outerDoc, "no outer doc for accessible remote tab!");
     if (!outerDoc) {
+      // In some cases, the outer document accessible may be unattached from its
+      // document at this point, if it is scheduled for removal. Do not assert
+      // in such case. An example: putting aria-hidden="true" on HTML:iframe
+      // element will destroy iframe's document asynchroniously, but
+      // the document may be a target of selection events until then, and thus
+      // it may attempt to deliever these events to MSAA clients.
       return nullptr;
     }
 
     return GetHWNDFor(outerDoc);
   }
 
   DocAccessible* document = aAccessible->Document();
   if(!document)