bug 1113845 - allow OuterDoc Accessible proxies to be shutdown while they own a document r=davidb

This commit is contained in:
Trevor Saunders 2014-12-19 16:46:49 -05:00
parent 9d309981a8
commit 605343d320

View File

@ -17,9 +17,13 @@ ProxyAccessible::Shutdown()
{
MOZ_ASSERT(!mOuterDoc);
uint32_t childCount = mChildren.Length();
for (uint32_t idx = 0; idx < childCount; idx++)
mChildren[idx]->Shutdown();
// XXX Ideally this wouldn't be necessary, but it seems OuterDoc accessibles
// can be destroyed before the doc they own.
if (!mOuterDoc) {
uint32_t childCount = mChildren.Length();
for (uint32_t idx = 0; idx < childCount; idx++)
mChildren[idx]->Shutdown();
}
mChildren.Clear();
ProxyDestroyed(this);