Fix for bug #59033. Properly detach the content progress listener and the container window to help with some shutdown crashes in the embedding widget. r=jst,valeski sr=mscott,brendan

This commit is contained in:
blizzard%redhat.com 2000-11-06 23:29:33 +00:00
Родитель 91891bb92e
Коммит a005b277b4
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -570,19 +570,22 @@ GtkMozEmbedPrivate::Destroy(void)
nsCOMPtr<nsIDocShellTreeItem> contentItem;
treeOwner->GetPrimaryContentShell(getter_AddRefs(contentItem));
NS_ASSERTION(contentItem, "failed to get content item");
// get the nsIWebProgress object for that docshell
webProgress = do_GetInterface(contentItem);
// remove the mContentProgress object from the content item
webProgress->RemoveProgressListener(mContentProgress);
// remove our chrome object as the tree owner for the content
// docShell.
contentItem->SetTreeOwner(nsnull);
// get the nsIWebProgress object for that docshell
webProgress = do_GetInterface(docShell);
// remove the mContentProgress object from that docshell
webProgress->RemoveProgressListener(mContentProgress);
// now that we have removed ourselves as the tree owner for the
// content item, remove ourselves as the tree owner for the
// browser
browserAsItem = do_QueryInterface(mWebBrowser);
browserAsItem->SetTreeOwner(nsnull);
// remove the browser chrome as the container window
mWebBrowser->SetContainerWindow(nsnull);
// destroy the native windows
nsCOMPtr<nsIBaseWindow> webBrowserBaseWindow =