From fe78631dc5cfa3c7b7668e4d237c09b3a13e68de Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Tue, 30 Nov 1999 00:10:17 +0000 Subject: [PATCH] uri dispatching nit....retarget the load group if we are opening a channel which has a load group different from our own. THIS CODE IS NOT executed unless uri dispatching is turned on. --- uriloader/base/nsDocLoader.cpp | 10 ++++++++++ webshell/src/nsDocLoader.cpp | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp index 19059e2e26dd..3682ee3ea41b 100644 --- a/uriloader/base/nsDocLoader.cpp +++ b/uriloader/base/nsDocLoader.cpp @@ -485,6 +485,7 @@ nsDocLoaderImpl::LoadOpenedDocument(nsIChannel * aOpenedChannel, // viewer container since that's the new guy whose actually going to be // receiving the content nsresult rv = NS_OK; + nsDocumentBindInfo* loader = nsnull; if (!aOpenedChannel) return NS_ERROR_NULL_POINTER; @@ -507,6 +508,15 @@ nsDocLoaderImpl::LoadOpenedDocument(nsIChannel * aOpenedChannel, * OnConnectionsComplete(...) notification is fired for the loader... */ mIsLoadingDocument = PR_TRUE; + + // let's try resetting the load group if we need to... + nsCOMPtr aCurrentLoadGroup; + rv = aOpenedChannel->GetLoadGroup(getter_AddRefs(aCurrentLoadGroup)); + if (NS_SUCCEEDED(rv)) + { + if (aCurrentLoadGroup.get() != mLoadGroup.get()) + aOpenedChannel->SetLoadGroup(mLoadGroup); + } return rv; } diff --git a/webshell/src/nsDocLoader.cpp b/webshell/src/nsDocLoader.cpp index 19059e2e26dd..3682ee3ea41b 100644 --- a/webshell/src/nsDocLoader.cpp +++ b/webshell/src/nsDocLoader.cpp @@ -485,6 +485,7 @@ nsDocLoaderImpl::LoadOpenedDocument(nsIChannel * aOpenedChannel, // viewer container since that's the new guy whose actually going to be // receiving the content nsresult rv = NS_OK; + nsDocumentBindInfo* loader = nsnull; if (!aOpenedChannel) return NS_ERROR_NULL_POINTER; @@ -507,6 +508,15 @@ nsDocLoaderImpl::LoadOpenedDocument(nsIChannel * aOpenedChannel, * OnConnectionsComplete(...) notification is fired for the loader... */ mIsLoadingDocument = PR_TRUE; + + // let's try resetting the load group if we need to... + nsCOMPtr aCurrentLoadGroup; + rv = aOpenedChannel->GetLoadGroup(getter_AddRefs(aCurrentLoadGroup)); + if (NS_SUCCEEDED(rv)) + { + if (aCurrentLoadGroup.get() != mLoadGroup.get()) + aOpenedChannel->SetLoadGroup(mLoadGroup); + } return rv; }