mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Backed out changeset 18151dec259d (bug 1184217) for causing bug 1329644
This commit is contained in:
parent
6d10f48530
commit
58249e3bf0
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user