зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
a260948fc1
Коммит
fe78631dc5
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче