Bug 1314016: Do not attempt to obtain wrapper and set MSAA ID on child document unless it was successfully added; r=tbsaunde
authorAaron Klotz <aklotz@mozilla.com>
Tue, 01 Nov 2016 16:07:58 -0600
changeset 347310 eb1336d8898f8b84de79b5a9e152ce82ed4fb3df
parent 347309 6c32452df00e86d86e65b5097ea253f488816067
child 347311 28ed60ea7e1117144e10ed931df1dfc9437dacbf
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs1314016
milestone52.0a1
Bug 1314016: Do not attempt to obtain wrapper and set MSAA ID on child document unless it was successfully added; r=tbsaunde MozReview-Commit-ID: G4lDNxXtoVx
dom/ipc/TabParent.cpp
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -933,17 +933,19 @@ TabParent::RecvPDocAccessibleConstructor
     MOZ_ASSERT(aParentID);
     if (!aParentID) {
       return false;
     }
 
     auto parentDoc = static_cast<a11y::DocAccessibleParent*>(aParentDoc);
     bool added = parentDoc->AddChildDoc(doc, aParentID);
 #ifdef XP_WIN
-    a11y::WrapperFor(doc)->SetID(aMsaaID);
+    if (added) {
+      a11y::WrapperFor(doc)->SetID(aMsaaID);
+    }
 #endif
     return added;
   } else {
     // null aParentDoc means this document is at the top level in the child
     // process.  That means it makes no sense to get an id for an accessible
     // that is its parent.
     MOZ_ASSERT(!aParentID);
     if (aParentID) {