[PATCH] respect application caches in imgLoader.cpp

RESOLVED FIXED

Status

()

RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: dcamp, Assigned: dcamp)

Tracking

({fixed1.9.1})

unspecified
fixed1.9.1
Points:
---
Bug Flags:
blocking1.9.1 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

10 years ago
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.
(Assignee)

Comment 1

10 years ago
Created attachment 327512 [details] [diff] [review]
v1
Assignee: nobody → dcamp
Status: NEW → ASSIGNED
(Assignee)

Comment 2

10 years ago
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.
(Assignee)

Comment 3

10 years ago
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
(Assignee)

Updated

10 years ago
Attachment #327512 - Attachment is obsolete: true
(Assignee)

Comment 4

10 years ago
Created attachment 352013 [details] [diff] [review]
fix

New version just refuses to reuse requests that come from a different app cache.
Attachment #352013 - Flags: superreview?(pavlov)
Attachment #352013 - Flags: review?(joe)
(Assignee)

Updated

10 years ago
Flags: blocking1.9.1?
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+
(Assignee)

Comment 5

10 years ago
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
Keywords: fixed1.9.1
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.