Fix for bug # 46828 sr=mscott r=rpotts

git-svn-id: svn://10.0.0.236/branches/Netscape_20000922_BRANCH@81436 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
radha%netscape.com
2000-10-19 06:25:16 +00:00
parent 93857b4326
commit bbff47ee2c

View File

@@ -2666,9 +2666,12 @@ NS_IMETHODIMP nsDocShell::CreateContentViewer(const char* aContentType,
//
// Retarget the document to this loadgroup...
//
if(currentLoadGroup)
currentLoadGroup->RemoveChannel(aOpenedChannel, nsnull, nsnull, nsnull);
/* First attach the channel to the right loadgroup
* and then remove from the old loadgroup. This
* puts the notifications in the right order and
* we don't null-out LSHE in OnStateChange() for
* all redirected urls
*/
aOpenedChannel->SetLoadGroup(loadGroup);
// Mark the channel as being a document URI...
@@ -2678,6 +2681,9 @@ NS_IMETHODIMP nsDocShell::CreateContentViewer(const char* aContentType,
aOpenedChannel->SetLoadAttributes(loadAttribs);
loadGroup->AddChannel(aOpenedChannel, nsnull);
if(currentLoadGroup)
currentLoadGroup->RemoveChannel(aOpenedChannel, nsnull, nsnull, nsnull);
}
#ifdef SH_IN_FRAMES
NS_ENSURE_SUCCESS(Embed(viewer, "", (nsISupports *) nsnull), NS_ERROR_FAILURE);