Backed out changeset 18151dec259d (bug 1184217) for causing bug 1329644

This commit is contained in:
Carsten "Tomcat" Book 2017-01-10 16:55:37 +01:00
parent 6d10f48530
commit 58249e3bf0
2 changed files with 10 additions and 35 deletions

View File

@ -439,24 +439,15 @@ DocAccessibleParent::Destroy()
GetAccService()->RemoteDocShutdown(this);
}
xpcAccessibleGeneric*
DocAccessibleParent::GetXPCAccessible(ProxyAccessible* aProxy)
{
xpcAccessibleDocument* doc = GetAccService()->GetXPCDocument(this);
MOZ_ASSERT(doc);
return doc->GetXPCAccessible(aProxy);
}
bool
DocAccessibleParent::CheckDocTreeInternal() const
DocAccessibleParent::CheckDocTree() const
{
size_t childDocs = mChildDocs.Length();
for (size_t i = 0; i < childDocs; i++) {
if (!mChildDocs[i] || mChildDocs[i]->mParentDoc != this)
return false;
if (!mChildDocs[i]->CheckDocTreeInternal()) {
if (!mChildDocs[i]->CheckDocTree()) {
return false;
}
}
@ -464,24 +455,13 @@ DocAccessibleParent::CheckDocTreeInternal() const
return true;
}
const DocAccessibleParent*
DocAccessibleParent::CheckTopDoc() const
xpcAccessibleGeneric*
DocAccessibleParent::GetXPCAccessible(ProxyAccessible* aProxy)
{
const DocAccessibleParent* doc = this;
while (doc->ParentDoc()) {
doc = doc->ParentDoc();
}
xpcAccessibleDocument* doc = GetAccService()->GetXPCDocument(this);
MOZ_ASSERT(doc);
MOZ_DIAGNOSTIC_ASSERT(doc->mTopLevel);
MOZ_DIAGNOSTIC_ASSERT(DocManager::TopLevelRemoteDocs()->Contains(doc));
return doc;
}
bool
DocAccessibleParent::CheckDocTree() const
{
return CheckTopDoc()->CheckDocTreeInternal();
return doc->GetXPCAccessible(aProxy);
}
#if defined(XP_WIN)

View File

@ -87,12 +87,9 @@ public:
void Destroy();
virtual void ActorDestroy(ActorDestroyReason aWhy) override
{
if (mShutdown) {
return;
}
MOZ_DIAGNOSTIC_ASSERT(CheckDocTree());
Destroy();
if (!mShutdown)
Destroy();
}
/*
@ -180,10 +177,8 @@ private:
uint32_t AddSubtree(ProxyAccessible* aParent,
const nsTArray<AccessibleData>& aNewTree, uint32_t aIdx,
uint32_t aIdxInParent);
xpcAccessibleGeneric* GetXPCAccessible(ProxyAccessible* aProxy);
MOZ_MUST_USE bool CheckDocTree() const;
MOZ_MUST_USE bool CheckDocTreeInternal() const;
const DocAccessibleParent* CheckTopDoc() const;
xpcAccessibleGeneric* GetXPCAccessible(ProxyAccessible* aProxy);
nsTArray<DocAccessibleParent*> mChildDocs;
DocAccessibleParent* mParentDoc;