WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 97596
ApplicationCache and WebCore::MemoryCache don't always play well together.
https://bugs.webkit.org/show_bug.cgi?id=97596
Summary
ApplicationCache and WebCore::MemoryCache don't always play well together.
Michael Nordman
Reported
2012-09-25 12:26:51 PDT
ApplicationCache and WebCore::MemoryCache don't always play well together. There's at least one way in which this can do the wrong thing. A document associated with an appcache can mistakenly load resources contained in the memcache instead of loading the particular version pinned in the appcache. This breaks its guarantee of loading the particular version of the resource at the time the associated cache was updated. I think the reciprocal could happen too, where an appcache response is loaded into the memcache. And that response is then used to satisfy a request to load a resource into a document that is not associated with the appcache. That unassociated document could be loading stale data. Using only the <url> as the key is problematic given how appcache'ing is supposed to work, where which resource to load is dependent on which document is doing the loading.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2012-09-27 11:20:14 PDT
Do you have a test case for this? I'm not sure what code path you have in mind - we just load from application cache without consulting other loader machinery.
Michael Nordman
Comment 2
2012-09-27 11:58:52 PDT
The pages referenced in this email thread demonstrate the problem. I was looking at CachedResourceLoader, methods like requestCSSStyleSheet and requestResource). Looks like that class sits in on top of ResourceLoader which is where the appcache gets consulted. If the CachedResourceLoader finds something in the memory cache for <url>... it doesn't get as far as ResourceLoader.
Michael Nordman
Comment 3
2012-09-27 12:03:14 PDT
oh... i forgot the link to the discussion in
comment #2
http://lists.w3.org/Archives/Public/public-fixing-appcache/2012Sep/0028.html
Alexey Proskuryakov
Comment 4
2012-10-01 09:46:29 PDT
Indeed, we should be checking with appcache before checking memory cache (and then appcache needs to become smarter, keeping pre-parsed stylesheets etc.)
Michael Nordman
Comment 5
2012-10-01 12:39:47 PDT
(In reply to
comment #4
)
> Indeed, we should be checking with appcache before checking memory cache (and then appcache needs to become smarter, keeping pre-parsed stylesheets etc.)
Having the appcache replicate the logic of the memcache worries me. Alternatively, the appcache could remain dumb if the memcached uses a different 'key' to identify resources. If the key were <url,appcacheid> instead of just <url>, i think resources could be loaded out of the appcache and then deposited in the memcache and available for quick access just like resources loaded from the network or the httpcache are.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug