Bug 635952 - crash [@ notificationController::IsTreeConstructed() ] on shutdown, r=surkov, fer, a=blocking2.x+

This commit is contained in:
Trevor Saunders 2011-03-28 23:00:02 +09:00
parent 8eec39795c
commit c735992881

View File

@ -650,6 +650,11 @@ nsDocAccessible::Shutdown()
RemoveEventListeners();
// Mark the document as shutdown before AT is notified about the document
// removal from its container (valid for root documents on ATK).
nsCOMPtr<nsIDocument> kungFuDeathGripDoc = mDocument;
mDocument = nsnull;
if (mParent) {
nsDocAccessible* parentDocument = mParent->GetDocAccessible();
if (parentDocument)
@ -672,9 +677,6 @@ nsDocAccessible::Shutdown()
mNodeToAccessibleMap.Clear();
ClearCache(mAccessibleCache);
nsCOMPtr<nsIDocument> kungFuDeathGripDoc = mDocument;
mDocument = nsnull;
nsHyperTextAccessibleWrap::Shutdown();
GetAccService()->NotifyOfDocumentShutdown(kungFuDeathGripDoc);