Bug 1321622: Make DocAccessibleParent::Unbind delegate to DocAccessibleParent::RemoveChildDoc; r=tbsaunde a=jcristau
authorAaron Klotz <aklotz@mozilla.com>
Tue, 06 Dec 2016 10:28:48 -1000
changeset 352902 b39873f48504a01f46ca0f88bb045652d0403427
parent 352901 11e76531aa74395dbb0f6f596909ad57eff416bc
child 352903 d20a6ec3db1eb57ac68379c384a41256859b6601
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
bugs1321622
milestone52.0a2
Bug 1321622: Make DocAccessibleParent::Unbind delegate to DocAccessibleParent::RemoveChildDoc; r=tbsaunde a=jcristau 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 bool RecvRoleChangedEvent(const uint32_t& aRole) override final;
 
   virtual bool 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 bool RecvShutdown() override;
   void Destroy();
   virtual void ActorDestroy(ActorDestroyReason aWhy) override
   {
     MOZ_DIAGNOSTIC_ASSERT(CheckDocTree());
     if (!mShutdown)