bug 1188415 - add document tree consistancy checks to more message handlers r=davidb

This commit is contained in:
Trevor Saunders 2015-07-28 15:31:41 -04:00
parent f8aa5202e5
commit 0e2e66f767

View File

@ -19,6 +19,8 @@ DocAccessibleParent::RecvShowEvent(const ShowEventData& aData)
if (mShutdown)
return true;
CheckDocTree();
if (aData.NewTree().IsEmpty()) {
NS_ERROR("no children being added");
return false;
@ -48,6 +50,8 @@ DocAccessibleParent::RecvShowEvent(const ShowEventData& aData)
}
#endif
CheckDocTree();
return true;
}
@ -118,6 +122,8 @@ DocAccessibleParent::RecvHideEvent(const uint64_t& aRootID)
parent->RemoveChild(root);
root->Shutdown();
CheckDocTree();
return true;
}
@ -190,9 +196,12 @@ DocAccessibleParent::RecvBindChildDoc(PDocAccessibleParent* aChildDoc, const uin
if (!aID)
return false;
CheckDocTree();
auto childDoc = static_cast<DocAccessibleParent*>(aChildDoc);
bool result = AddChildDoc(childDoc, aID, false);
MOZ_ASSERT(result);
CheckDocTree();
return result;
}