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
Родитель 09ad196ba3
Коммит 6dfa5d2acf
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -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;
}