Bug 1321622: Make DocAccessibleParent::Unbind delegate to DocAccessibleParent::RemoveChildDoc; r=tbsaunde
authorAaron Klotz <aklotz@mozilla.com>
Tue, 06 Dec 2016 10:28:48 -1000
changeset 325315 dbdc4e234e1f129f8a475a8709fa5e672fc93a34
parent 325314 0d7431e24546049ee2bd0fb1e05a5b124ed01f81
child 325316 26025c7f0d298872c5fe88739c9897254da6fc75
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewerstbsaunde
bugs1321622
milestone53.0a1
Bug 1321622: Make DocAccessibleParent::Unbind delegate to DocAccessibleParent::RemoveChildDoc; r=tbsaunde MozReview-Commit-ID: 4O3xJnPDpRB
accessible/ipc/DocAccessibleParent.h
--- a/accessible/ipc/DocAccessibleParent.h
+++ b/accessible/ipc/DocAccessibleParent.h
@@ -71,22 +71,21 @@ public:
                                                      const uint32_t& aType) override;
 
   virtual mozilla::ipc::IPCResult RecvRoleChangedEvent(const uint32_t& aRole) override final;
 
   virtual mozilla::ipc::IPCResult RecvBindChildDoc(PDocAccessibleParent* aChildDoc, const uint64_t& aID) override;
 
   void Unbind()
   {
-    mParent = nullptr;
     if (DocAccessibleParent* parent = ParentDoc()) {
-      parent->mChildDocs.RemoveElement(this);
+      parent->RemoveChildDoc(this);
     }
 
-    mParentDoc = nullptr;
+    mParent = nullptr;
   }
 
   virtual mozilla::ipc::IPCResult RecvShutdown() override;
   void Destroy();
   virtual void ActorDestroy(ActorDestroyReason aWhy) override
   {
     MOZ_DIAGNOSTIC_ASSERT(CheckDocTree());
     if (!mShutdown)