Bug 1363027 - diagnostic asserts for Accessible::RemoveChild, r=davidb
authorAlexander Surkov <surkov.alexander@gmail.com>
Tue, 09 May 2017 15:56:41 -0400
changeset 357445 5a473a4e0eed937aea85cd97725dd93a85fbdf0c
parent 357444 cf2ee5242986e5d087ac48238a1fca8e96d6e1a9
child 357446 3e9a56b96d0fc439f672254ef77094e105700ba0
push id31792
push usercbook@mozilla.com
push dateWed, 10 May 2017 13:07:59 +0000
treeherdermozilla-central@ebbcdaa5b580 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1363027
milestone55.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 1363027 - diagnostic asserts for Accessible::RemoveChild, r=davidb
accessible/generic/DocAccessible.cpp
--- a/accessible/generic/DocAccessible.cpp
+++ b/accessible/generic/DocAccessible.cpp
@@ -1979,25 +1979,27 @@ DocAccessible::ContentRemoved(Accessible
 
 #ifdef A11Y_LOG
   logging::TreeInfo("process content removal", 0,
                     "container", parent, "child", aChild, nullptr);
 #endif
 
   TreeMutation mt(parent);
   mt.BeforeRemoval(aChild);
+  MOZ_DIAGNOSTIC_ASSERT(aChild->Parent(), "Unparented #1");
 
   if (aChild->IsRelocated()) {
     nsTArray<RefPtr<Accessible> >* owned = mARIAOwnsHash.Get(parent);
     MOZ_ASSERT(owned, "IsRelocated flag is out of sync with mARIAOwnsHash");
     owned->RemoveElement(aChild);
     if (owned->Length() == 0) {
       mARIAOwnsHash.Remove(parent);
     }
   }
+  MOZ_DIAGNOSTIC_ASSERT(aChild->Parent(), "Unparented #2");
   parent->RemoveChild(aChild);
   UncacheChildrenInSubtree(aChild);
 
   mt.Done();
 }
 
 void
 DocAccessible::ContentRemoved(nsIContent* aContentNode)