mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 968417 - revalidating images needs loadgroup parent for spdy push r=seth
This commit is contained in:
parent
0636f0c304
commit
d171aafe06
@ -401,7 +401,6 @@ static nsresult NewImageChannel(nsIChannel **aResult,
|
||||
nsIPrincipal *aLoadingPrincipal)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIChannel> newChannel;
|
||||
nsCOMPtr<nsIHttpChannel> newHttpChannel;
|
||||
|
||||
nsCOMPtr<nsIInterfaceRequestor> callbacks;
|
||||
@ -463,6 +462,18 @@ static nsresult NewImageChannel(nsIChannel **aResult,
|
||||
*aResult, aURI, false);
|
||||
*aForcePrincipalCheckForCacheEntry = setOwner;
|
||||
|
||||
// Create a new loadgroup for this new channel, using the old group as
|
||||
// the parent. The indirection keeps the channel insulated from cancels,
|
||||
// but does allow a way for this revalidation to be associated with at
|
||||
// least one base load group for scheduling/caching purposes.
|
||||
|
||||
nsCOMPtr<nsILoadGroup> loadGroup = do_CreateInstance(NS_LOADGROUP_CONTRACTID);
|
||||
nsCOMPtr<nsILoadGroupChild> childLoadGroup = do_QueryInterface(loadGroup);
|
||||
if (childLoadGroup) {
|
||||
childLoadGroup->SetParentLoadGroup(aLoadGroup);
|
||||
}
|
||||
(*aResult)->SetLoadGroup(loadGroup);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -1679,18 +1690,9 @@ nsresult imgLoader::LoadImage(nsIURI *aURI,
|
||||
PR_LOG(GetImgLog(), PR_LOG_DEBUG,
|
||||
("[this=%p] imgLoader::LoadImage -- Created new imgRequest [request=%p]\n", this, request.get()));
|
||||
|
||||
// Create a loadgroup for this new channel. This way if the channel
|
||||
// is redirected, we'll have a way to cancel the resulting channel.
|
||||
// Inform the new loadgroup of the old one so they can still be correlated
|
||||
// together as a logical group.
|
||||
nsCOMPtr<nsILoadGroup> loadGroup =
|
||||
do_CreateInstance(NS_LOADGROUP_CONTRACTID);
|
||||
nsCOMPtr<nsILoadGroupChild> childLoadGroup = do_QueryInterface(loadGroup);
|
||||
if (childLoadGroup)
|
||||
childLoadGroup->SetParentLoadGroup(aLoadGroup);
|
||||
newChannel->SetLoadGroup(loadGroup);
|
||||
|
||||
request->Init(aURI, aURI, loadGroup, newChannel, entry, aCX,
|
||||
nsCOMPtr<nsILoadGroup> channelLoadGroup;
|
||||
newChannel->GetLoadGroup(getter_AddRefs(channelLoadGroup));
|
||||
request->Init(aURI, aURI, channelLoadGroup, newChannel, entry, aCX,
|
||||
aLoadingPrincipal, corsmode);
|
||||
|
||||
// Pass the inner window ID of the loading document, if possible.
|
||||
|
@ -314,6 +314,10 @@ Http2Stream::ParseHttpRequestHeaders(const char *buf,
|
||||
if (cache)
|
||||
pushedStream = cache->RemovePushedStreamHttp2(hashkey);
|
||||
|
||||
LOG3(("Pushed Stream Lookup "
|
||||
"session=%p key=%s loadgroupci=%p cache=%p hit=%p\n",
|
||||
mSession, hashkey.get(), loadGroupCI, cache, pushedStream));
|
||||
|
||||
if (pushedStream) {
|
||||
LOG3(("Pushed Stream Match located id=0x%X key=%s\n",
|
||||
pushedStream->StreamID(), hashkey.get()));
|
||||
|
Loading…
Reference in New Issue
Block a user