From bbff47ee2c5d556fa13a42454dae560d7ed4d904 Mon Sep 17 00:00:00 2001 From: "radha%netscape.com" Date: Thu, 19 Oct 2000 06:25:16 +0000 Subject: [PATCH] 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 --- mozilla/docshell/base/nsDocShell.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 00367ce0020..6e34c9c0624 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -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);