Bug 442806 adds per-webapp caches that are associated with a given context. These application caches affect loads, and are propagated through the loadgroup. There are two problems with this in imgLoader.cpp: a) The cache shouldn't reuse requests that came from one application cache to serve requests from another application cache (or not from an app cache at all). b) The load group isn't passed on, so the channel doesn't know to use the application cache. The attached patch tries to fix these two problems, by refusing to reuse cached requests that come from a different app cache, and by manually propagating the nsIApplicationCache instead of relying on the load group.
Created attachment 327512 [details] [diff] [review] v1
Assignee: nobody → dcamp
Status: NEW → ASSIGNED
Created attachment 328774 [details] [diff] [review] updated for 430061 The patch in bug 430061 obsoletes v1. New version of the patch is updated with that patch in mind.
Comment on attachment 328774 [details] [diff] [review] updated for 430061 The latest version of the app-cache patch will pick up the application cache from either the notification callbacks or the load group's notification callbacks. Since imgLoader passes on the docshell's notification callbacks, the part of this patch that propagates the application cache is no longer necessary. We still need the change to avoid reusing requests from different application caches, I'll put together a new patch for that.
Attachment #328774 - Attachment is obsolete: true
Attachment #327512 - Attachment is obsolete: true
Created attachment 352013 [details] [diff] [review] fix New version just refuses to reuse requests that come from a different app cache.
Attachment #352013 - Flags: review?(joe) → review+
Flags: blocking1.9.1? → blocking1.9.1+
Summary: respect application caches in imgLoader.cpp → [PATCH] respect application caches in imgLoader.cpp
Attachment #352013 - Flags: superreview?(pavlov) → superreview+
Landed on trunk as http://hg.mozilla.org/mozilla-central/rev/e9287c7efedc Landed on 1.9.1 as http://hg.mozilla.org/releases/mozilla-1.9.1/rev/c0d157855e30
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.