Backed out changeset 1d82f63f06e7 (bug 1184217) for Marionette crashes.

This commit is contained in:
Ryan VanderMeulen 2015-08-25 17:02:57 -04:00
parent 1116e55dd0
commit a85dc7f568
2 changed files with 2 additions and 22 deletions

View File

@ -266,14 +266,14 @@ DocAccessibleParent::Destroy()
} }
bool bool
DocAccessibleParent::CheckDocTreeInternal() const DocAccessibleParent::CheckDocTree() const
{ {
size_t childDocs = mChildDocs.Length(); size_t childDocs = mChildDocs.Length();
for (size_t i = 0; i < childDocs; i++) { for (size_t i = 0; i < childDocs; i++) {
if (!mChildDocs[i] || mChildDocs[i]->mParentDoc != this) if (!mChildDocs[i] || mChildDocs[i]->mParentDoc != this)
return false; return false;
if (!mChildDocs[i]->CheckDocTreeInternal()) { if (!mChildDocs[i]->CheckDocTree()) {
return false; return false;
} }
} }
@ -281,23 +281,5 @@ DocAccessibleParent::CheckDocTreeInternal() const
return true; return true;
} }
const DocAccessibleParent*
DocAccessibleParent::CheckTopDoc() const
{
const DocAccessibleParent* doc = this;
while (doc->ParentDoc()) {
doc = doc->ParentDoc();
}
MOZ_DIAGNOSTIC_ASSERT(doc->mTopLevel);
return doc;
}
bool
DocAccessibleParent::CheckDocTree() const
{
return CheckTopDoc()->CheckDocTreeInternal();
}
} // a11y } // a11y
} // mozilla } // mozilla

View File

@ -152,8 +152,6 @@ private:
const nsTArray<AccessibleData>& aNewTree, uint32_t aIdx, const nsTArray<AccessibleData>& aNewTree, uint32_t aIdx,
uint32_t aIdxInParent); uint32_t aIdxInParent);
MOZ_WARN_UNUSED_RESULT bool CheckDocTree() const; MOZ_WARN_UNUSED_RESULT bool CheckDocTree() const;
MOZ_WARN_UNUSED_RESULT bool CheckDocTreeInternal() const;
const DocAccessibleParent* CheckTopDoc() const;
nsTArray<DocAccessibleParent*> mChildDocs; nsTArray<DocAccessibleParent*> mChildDocs;
DocAccessibleParent* mParentDoc; DocAccessibleParent* mParentDoc;