More massaging to allow for XML docs with no webshells.

This commit is contained in:
hyatt%netscape.com 2000-01-12 10:50:02 +00:00
Родитель 0bc4c0eb6c
Коммит fb4b11f8c8
2 изменённых файлов: 6 добавлений и 4 удалений

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

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

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

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