Back out dougt's channel changes

This commit is contained in:
disttsc@bart.nl
2001-02-12 03:14:23 +00:00
parent 410678307f
commit c6327f63d5
220 changed files with 6737 additions and 5195 deletions

View File

@@ -2751,7 +2751,7 @@ NS_IMETHODIMP nsDocShell::CreateAboutBlankContentViewer()
}
NS_IMETHODIMP nsDocShell::CreateContentViewer(const char* aContentType,
nsIRequest *request, nsIStreamListener** aContentHandler)
nsIChannel* aOpenedChannel, nsIStreamListener** aContentHandler)
{
// Can we check the content type of the current content viewer
// and reuse it without destroying it and re-creating it?
@@ -2761,17 +2761,12 @@ NS_IMETHODIMP nsDocShell::CreateContentViewer(const char* aContentType,
// Instantiate the content viewer object
nsCOMPtr<nsIContentViewer> viewer;
nsresult rv = NewContentViewerObj(aContentType, request, loadGroup,
aContentHandler, getter_AddRefs(viewer));
if(NS_FAILED(rv))
if(NS_FAILED(NewContentViewerObj(aContentType, aOpenedChannel, loadGroup,
aContentHandler, getter_AddRefs(viewer))))
return NS_ERROR_FAILURE;
// we've created a new document so go ahead and call OnLoadingSite
mURIResultedInDocument = PR_TRUE;
nsCOMPtr<nsIChannel> aOpenedChannel = do_QueryInterface(request);
OnLoadingSite(aOpenedChannel);
// let's try resetting the load group if we need to...
@@ -2802,9 +2797,9 @@ NS_IMETHODIMP nsDocShell::CreateContentViewer(const char* aContentType,
aOpenedChannel->SetLoadAttributes(loadAttribs);
loadGroup->AddRequest(request, nsnull);
loadGroup->AddChannel(aOpenedChannel, nsnull);
if(currentLoadGroup)
currentLoadGroup->RemoveRequest(request, nsnull, nsnull, nsnull);
currentLoadGroup->RemoveChannel(aOpenedChannel, nsnull, nsnull, nsnull);
}
#ifdef SH_IN_FRAMES
@@ -2818,7 +2813,7 @@ NS_IMETHODIMP nsDocShell::CreateContentViewer(const char* aContentType,
}
nsresult nsDocShell::NewContentViewerObj(const char* aContentType,
nsIRequest *request, nsILoadGroup* aLoadGroup,
nsIChannel* aOpenedChannel, nsILoadGroup* aLoadGroup,
nsIStreamListener** aContentHandler, nsIContentViewer** aViewer)
{
//XXX This should probably be some category thing....
@@ -2845,8 +2840,6 @@ nsresult nsDocShell::NewContentViewerObj(const char* aContentType,
if(!docLoaderFactory)
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIChannel> aOpenedChannel = do_QueryInterface(request);
// Now create an instance of the content viewer
NS_ENSURE_SUCCESS(docLoaderFactory->CreateInstance(