More massaging to allow for XML docs with no webshells.

git-svn-id: svn://10.0.0.236/trunk@57541 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hyatt%netscape.com 2000-01-12 10:50:02 +00:00
parent af4a0a5bb4
commit f823b03f70
2 changed files with 6 additions and 4 deletions

View File

@ -207,7 +207,7 @@ nsXMLDocument::StartDocumentLoad(const char* aCommand,
return rv;
}
nsIWebShell* webShell;
nsIWebShell* webShell = nsnull;
nsAutoString charset("UTF-8");
nsCharsetSource charsetSource = kCharsetFromDocTypeDefault;
@ -263,7 +263,8 @@ nsXMLDocument::StartDocumentLoad(const char* aCommand,
if (NS_OK == rv) {
nsIXMLContentSink* sink;
rv = aContainer->QueryInterface(kIWebShellIID, (void**)&webShell);
if (aContainer)
rv = aContainer->QueryInterface(kIWebShellIID, (void**)&webShell);
if(NS_SUCCEEDED(rv) && (nsnull != webShell)) {
nsCOMPtr<nsIContentViewer> cv;

View File

@ -207,7 +207,7 @@ nsXMLDocument::StartDocumentLoad(const char* aCommand,
return rv;
}
nsIWebShell* webShell;
nsIWebShell* webShell = nsnull;
nsAutoString charset("UTF-8");
nsCharsetSource charsetSource = kCharsetFromDocTypeDefault;
@ -263,7 +263,8 @@ nsXMLDocument::StartDocumentLoad(const char* aCommand,
if (NS_OK == rv) {
nsIXMLContentSink* sink;
rv = aContainer->QueryInterface(kIWebShellIID, (void**)&webShell);
if (aContainer)
rv = aContainer->QueryInterface(kIWebShellIID, (void**)&webShell);
if(NS_SUCCEEDED(rv) && (nsnull != webShell)) {
nsCOMPtr<nsIContentViewer> cv;