Closed Bug 968417 Opened 10 years ago Closed 10 years ago

revalidating images without a loadgroup

Categories

(Core :: Graphics: ImageLib, defect)

29 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: mcmanus, Assigned: mcmanus)

Details

(Whiteboard: [spdy])

Attachments

(1 file, 1 obsolete file)

imglib appears to intentionally revalidate images without using the loadgroup of the triggering request because the load can be shared and we don't want cancel events on one loadgroup to cancel the load.

otoh necko uses the loadgroup to tie some things together into a logical set for scheduling and caching purposes.

non-validating image loads work around this by creating a new loadgroup and setting the parent to the original one.

I'm going to include a patch that does the same thing for validations.

Absence of the loadgroup has lead to some http2 and spdy push failures in https://http2.iijplus.jp/public/push/push_test.html
Whiteboard: [spdy]
Assignee: nobody → mcmanus
Status: NEW → ASSIGNED
Attachment #8387765 - Flags: review?(seth)
Comment on attachment 8387765 [details] [diff] [review]
spdy/http-2 server push fails on image revalidation

Review of attachment 8387765 [details] [diff] [review]:
-----------------------------------------------------------------

::: image/src/imgLoader.cpp
@@ +1211,5 @@
> +    nsCOMPtr<nsILoadGroupChild> childLoadGroup = do_QueryInterface(loadGroup);
> +    if (childLoadGroup) {
> +      childLoadGroup->SetParentLoadGroup(aLoadGroup);
> +    }
> +    newChannel->SetLoadGroup(loadGroup);

So this all looks good, but I have to wonder why we don't just do this in NewImageChannel. There are two callers: this one (ValidateRequestWithNewChannel) and LoadImage. Given the reasoning in comment 0, it sounds like we don't really want to use a null loadgroup in LoadImage either. Is there a reason why the situation in LoadImage is different?

::: netwerk/protocol/http/Http2Stream.cpp
@@ +315,5 @@
>        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));

Just making sure this was intended to be a part of this patch.
(In reply to Seth Fowler [:seth] from comment #3)
> Comment on attachment 8387765 [details] [diff] [review]
> spdy/http-2 server push fails on image revalidation
> 
> Review of attachment 8387765 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: image/src/imgLoader.cpp
> @@ +1211,5 @@
> > +    nsCOMPtr<nsILoadGroupChild> childLoadGroup = do_QueryInterface(loadGroup);
> > +    if (childLoadGroup) {
> > +      childLoadGroup->SetParentLoadGroup(aLoadGroup);
> > +    }
> > +    newChannel->SetLoadGroup(loadGroup);
> 
> So this all looks good, but I have to wonder why we don't just do this in
> NewImageChannel. There are two callers: this one
> (ValidateRequestWithNewChannel) and LoadImage. Given the reasoning in
> comment 0, it sounds like we don't really want to use a null loadgroup in
> LoadImage either. Is there a reason why the situation in LoadImage is
> different?


loadimage has the same logic (around line 1702).. I can consoldiate it in newimagechannel if you like.


> Just making sure this was intended to be a part of this patch.

yes.. its useful logging for the issue the patch is addressing.

thanks!
Flags: needinfo?(seth)
(In reply to Patrick McManus [:mcmanus] from comment #4)
> loadimage has the same logic (around line 1702).. I can consoldiate it in
> newimagechannel if you like.

Yeah, I'd definitely prefer that if it's straightforward.
Flags: needinfo?(seth)
Attachment #8387765 - Attachment is obsolete: true
Attachment #8387765 - Flags: review?(seth)
https://tbpl.mozilla.org/?tree=Try&rev=ef2d9fbd3860

I also removed an unused variable: newChannel. (I actually got confused by it and momentarily used it instead of *aResult)
Comment on attachment 8399409 [details] [diff] [review]
revalidating images needs loadgroup parent for spdy push

Review of attachment 8399409 [details] [diff] [review]:
-----------------------------------------------------------------

So good. Thanks, Patrick.
Attachment #8399409 - Flags: review?(seth) → review+
https://hg.mozilla.org/mozilla-central/rev/ce4b890505d1
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: