Bug 735666 - crash [@ nsIDocument::GetContainer() ], r=tbsaunde

This commit is contained in:
Alexander Surkov 2012-03-14 16:37:50 -04:00
parent 85e3bf557d
commit acc4abc2b5

View File

@ -117,8 +117,10 @@ NotificationController::Shutdown()
// Shutdown handling child documents.
PRInt32 childDocCount = mHangingChildDocuments.Length();
for (PRInt32 idx = childDocCount - 1; idx >= 0; idx--)
mHangingChildDocuments[idx]->Shutdown();
for (PRInt32 idx = childDocCount - 1; idx >= 0; idx--) {
if (!mHangingChildDocuments[idx]->IsDefunct())
mHangingChildDocuments[idx]->Shutdown();
}
mHangingChildDocuments.Clear();
@ -259,6 +261,8 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
PRUint32 hangingDocCnt = mHangingChildDocuments.Length();
for (PRUint32 idx = 0; idx < hangingDocCnt; idx++) {
nsDocAccessible* childDoc = mHangingChildDocuments[idx];
if (childDoc->IsDefunct())
continue;
nsIContent* ownerContent = mDocument->GetDocumentNode()->
FindContentForSubDocument(childDoc->GetDocumentNode());