Bug 1321936: Check whether new child docs are defunct before doing IPC binding; r=tbsaunde a=jcristau
authorAaron Klotz <aklotz@mozilla.com>
Fri, 02 Dec 2016 12:33:01 -0700
changeset 353113 1f14d6231bac5d1942bdbc25502f33a3813648bb
parent 353112 244b5d0611f46e77fe88aedb469e290f32d16c29
child 353114 a87a36e49ccc487ea0d6c0d69c43a3b4cb4aeb81
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde, jcristau
bugs1321936
milestone52.0a2
Bug 1321936: Check whether new child docs are defunct before doing IPC binding; r=tbsaunde a=jcristau MozReview-Commit-ID: 2kX991JncyV
accessible/base/NotificationController.cpp
--- a/accessible/base/NotificationController.cpp
+++ b/accessible/base/NotificationController.cpp
@@ -837,16 +837,20 @@ NotificationController::WillRefresh(mozi
   }
 
   ProcessEventQueue();
 
   if (IPCAccessibilityActive()) {
     size_t newDocCount = newChildDocs.Length();
     for (size_t i = 0; i < newDocCount; i++) {
       DocAccessible* childDoc = newChildDocs[i];
+      if (childDoc->IsDefunct()) {
+        continue;
+      }
+
       Accessible* parent = childDoc->Parent();
       DocAccessibleChild* parentIPCDoc = mDocument->IPCDoc();
       uint64_t id = reinterpret_cast<uintptr_t>(parent->UniqueID());
       MOZ_ASSERT(id);
       DocAccessibleChild* ipcDoc = childDoc->IPCDoc();
       if (ipcDoc) {
         parentIPCDoc->SendBindChildDoc(ipcDoc, id);
         continue;