Bug 1346518 - extend Accessible::RemoveChild debugging assertions, r=yzen
authorAlexander Surkov <surkov.alexander@gmail.com>
Tue, 21 Mar 2017 10:13:32 -0400
changeset 348689 0046bf50e45ff3986c6192a428a8a275f6641ba9
parent 348688 6f4a9281e405bd8e072f9d1ccef91b1523077e14
child 348690 2857884dea0e7c17972fdda9eca35928722ffd08
push id31533
push userkwierso@gmail.com
push dateTue, 21 Mar 2017 23:08:53 +0000
treeherdermozilla-central@8744e9f8eb99 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyzen
bugs1346518
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 1346518 - extend Accessible::RemoveChild debugging assertions, r=yzen
accessible/generic/Accessible.cpp
--- a/accessible/generic/Accessible.cpp
+++ b/accessible/generic/Accessible.cpp
@@ -2127,20 +2127,21 @@ Accessible::InsertChildAt(uint32_t aInde
   aChild->BindToParent(this, aIndex);
   return true;
 }
 
 bool
 Accessible::RemoveChild(Accessible* aChild)
 {
   MOZ_DIAGNOSTIC_ASSERT(aChild, "No child was given");
+  MOZ_DIAGNOSTIC_ASSERT(aChild->mParent, "No parent");
   MOZ_DIAGNOSTIC_ASSERT(aChild->mParent == this, "Wrong parent");
   MOZ_DIAGNOSTIC_ASSERT(aChild->mIndexInParent != -1, "Unbound child was given");
   MOZ_DIAGNOSTIC_ASSERT((mStateFlags & eKidsMutating) || aChild->IsDefunct() || aChild->IsDoc(),
-                        "Defunct child was given");
+                        "Illicit children change");
 
   int32_t index = static_cast<uint32_t>(aChild->mIndexInParent);
   if (mChildren.SafeElementAt(index) != aChild) {
     MOZ_ASSERT_UNREACHABLE("A wrong child index");
     index = mChildren.IndexOf(aChild);
     if (index == -1) {
       MOZ_ASSERT_UNREACHABLE("No child was found");
       return false;