43050. r=dougt. null checking and ctor null init'ing

git-svn-id: svn://10.0.0.236/trunk@73486 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
valeski%netscape.com
2000-06-29 00:49:13 +00:00
parent 56ff07cb95
commit 4a64f9c451

View File

@@ -41,7 +41,11 @@
//*****************************************************************************
nsDocShellTreeOwner::nsDocShellTreeOwner() : mWebBrowser(nsnull),
mTreeOwner(nsnull)
mTreeOwner(nsnull),
mWebBrowserChrome(nsnull),
mOwnerProgressListener(nsnull),
mOwnerWin(nsnull),
mOwnerRequestor(nsnull)
{
NS_INIT_REFCNT();
}
@@ -204,6 +208,7 @@ NS_IMETHODIMP nsDocShellTreeOwner::GetNewWindow(PRInt32 aChromeFlags,
*aDocShellTreeItem = nsnull;
nsCOMPtr<nsIWebBrowser> webBrowser;
NS_ENSURE_STATE(mWebBrowserChrome, NS_ERROR_FAILURE);
mWebBrowserChrome->GetNewBrowser(aChromeFlags, getter_AddRefs(webBrowser));
NS_ENSURE_TRUE(webBrowser, NS_ERROR_FAILURE);