Bug 201423 Crash [@ nsWebShell::Create] if urildr.dll is missing

r=adamlock sr=bz
This commit is contained in:
timeless%mozdev.org 2003-04-10 18:17:57 +00:00
Родитель d1d395519d
Коммит 77d8318ad1
2 изменённых файлов: 11 добавлений и 6 удалений

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

@ -1222,14 +1222,19 @@ NS_IMETHODIMP nsWebShell::Create()
WEB_TRACE(WEB_TRACE_CALLS,
("nsWebShell::Init: this=%p", this));
// HACK....force the uri loader to give us a load cookie for this webshell...then get it's
// HACK....force the uri loader to give us a load cookie for this webshell...then get its
// doc loader and store it...as more of the docshell lands, we'll be able to get rid
// of this hack...
nsCOMPtr<nsIURILoader> uriLoader = do_GetService(NS_URI_LOADER_CONTRACTID);
uriLoader->GetDocumentLoaderForContext(NS_STATIC_CAST(nsIWebShell*, this),
getter_AddRefs(mDocLoader));
nsresult rv;
nsCOMPtr<nsIURILoader> uriLoader = do_GetService(NS_URI_LOADER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIContentViewerContainer> shellAsContainer = do_QueryInterface(NS_STATIC_CAST(nsIWebShell*, this));
rv = uriLoader->GetDocumentLoaderForContext(NS_STATIC_CAST(nsIWebShell*, this),
getter_AddRefs(mDocLoader));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIContentViewerContainer> shellAsContainer;
CallQueryInterface(this, NS_STATIC_CAST(nsIContentViewerContainer**, getter_AddRefs(shellAsContainer)));
// Set the webshell as the default IContentViewerContainer for the loader...
mDocLoader->SetContainer(shellAsContainer);

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

@ -327,7 +327,7 @@ nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent,
nsnull,
nsnull,
nsnull);
NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(rv, rv);
}
return rv;