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.
This commit is contained in:
mscott%netscape.com 1999-11-30 00:10:17 +00:00
Родитель a260948fc1
Коммит fe78631dc5
2 изменённых файлов: 20 добавлений и 0 удалений

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

@ -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<nsILoadGroup> aCurrentLoadGroup;
rv = aOpenedChannel->GetLoadGroup(getter_AddRefs(aCurrentLoadGroup));
if (NS_SUCCEEDED(rv))
{
if (aCurrentLoadGroup.get() != mLoadGroup.get())
aOpenedChannel->SetLoadGroup(mLoadGroup);
}
return rv;
}

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

@ -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<nsILoadGroup> aCurrentLoadGroup;
rv = aOpenedChannel->GetLoadGroup(getter_AddRefs(aCurrentLoadGroup));
if (NS_SUCCEEDED(rv))
{
if (aCurrentLoadGroup.get() != mLoadGroup.get())
aOpenedChannel->SetLoadGroup(mLoadGroup);
}
return rv;
}