Backed out changeset 39398fba066e (bug 1098386) for actually leaking

This commit is contained in:
Wes Kocher 2014-12-09 13:36:24 -08:00
parent e98a1760b2
commit f3c9a75df6
3 changed files with 7 additions and 9 deletions

View File

@ -36,8 +36,6 @@ using namespace mozilla;
using namespace mozilla::a11y;
using namespace mozilla::dom;
nsTArray<DocAccessibleParent*> DocManager::sRemoteDocuments;
////////////////////////////////////////////////////////////////////////////////
// DocManager
////////////////////////////////////////////////////////////////////////////////

View File

@ -74,20 +74,20 @@ public:
/*
* Notification that a top level document in a content process has gone away.
*/
static void RemoteDocShutdown(DocAccessibleParent* aDoc)
void RemoteDocShutdown(DocAccessibleParent* aDoc)
{
DebugOnly<bool> result = sRemoteDocuments.RemoveElement(aDoc);
DebugOnly<bool> result = mRemoteDocuments.RemoveElement(aDoc);
MOZ_ASSERT(result, "Why didn't we find the document!");
}
/*
* Notify of a new top level document in a content process.
*/
static void RemoteDocAdded(DocAccessibleParent* aDoc)
void RemoteDocAdded(DocAccessibleParent* aDoc)
{
MOZ_ASSERT(!sRemoteDocuments.Contains(aDoc),
MOZ_ASSERT(!mRemoteDocuments.Contains(aDoc),
"How did we already have the doc!");
sRemoteDocuments.AppendElement(aDoc);
mRemoteDocuments.AppendElement(aDoc);
}
#ifdef DEBUG
@ -176,7 +176,7 @@ private:
/*
* The list of remote top level documents.
*/
static nsTArray<DocAccessibleParent*> sRemoteDocuments;
nsTArray<DocAccessibleParent*> mRemoteDocuments;
};
/**

View File

@ -2864,7 +2864,7 @@ ContentParent::RecvPDocAccessibleConstructor(PDocAccessibleParent* aDoc, PDocAcc
return parentDoc->AddChildDoc(doc, aParentID);
} else {
MOZ_ASSERT(!aParentID);
a11y::DocManager::RemoteDocAdded(doc);
GetAccService()->RemoteDocAdded(doc);
}
#endif
return true;