Fully implement nsDocShell::Destroy() so that webShell can rely on it for it's implementation.

git-svn-id: svn://10.0.0.236/trunk@64648 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tbogard%aol.net
2000-03-31 00:15:17 +00:00
parent 9426cce0cc
commit 290093a2de

View File

@@ -1232,12 +1232,30 @@ NS_IMETHODIMP nsDocShell::Create()
NS_IMETHODIMP nsDocShell::Destroy()
{
// Stop any URLs that are currently being loaded...
Stop();
if(mDocLoader)
{
mDocLoader->Destroy();
mDocLoader->SetContainer(nsnull);
}
SetDocLoaderObserver(nsnull);
// Remove this docshell from its parent's child list
nsCOMPtr<nsIDocShellTreeNode> docShellParentAsNode(do_QueryInterface(mParent));
if(docShellParentAsNode)
docShellParentAsNode->RemoveChild(this);
DestroyChildren();
mContentViewer = nsnull;
mDocLoader = nsnull;
mDocLoaderObserver = nsnull;
mParentWidget = nsnull;
mPrefs = nsnull;
mCurrentURI = nsnull;
mWebProgressListenerList = nsnull;
if(mScriptGlobal)
{
@@ -1254,7 +1272,7 @@ NS_IMETHODIMP nsDocShell::Destroy()
mScriptContext = nsnull;
mSessionHistory = nsnull;
mLoadCookie = nsnull;
mTreeOwner = nsnull;
SetTreeOwner(nsnull);
if(mInitInfo)
{
@@ -1268,7 +1286,6 @@ NS_IMETHODIMP nsDocShell::Destroy()
NS_RELEASE(mContentListener);
}
return NS_OK;
}