[Webkit-unassigned] [Bug 89230] Add support for application cache prefer-online mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 29 14:46:56 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=89230





--- Comment #14 from Michael Nordman <michaeln at google.com>  2012-08-29 14:46:58 PST ---
There's another aspect of prefer-online that I'm not sure is covered in this patch. How are the contents of the appcache utilized for subresource loads in this case?

> > Something may not be right here. I think a resource for the new location may be contained in a different appcache, but this logic will not pick that appcache up and is expecting to find the a resource for the new location in m_mainResourceApplicationCache. But if/when that resource is not found, line 93 will crash.
> > 
> This modification just avoid to retrive cache for request repeatly since this cache maybe loaded before MainResourceLoader fetch the resources from network.

Maybe I'm confused... but... when this is invoked a 2nd time via the callsite in maybeLoadMainResourceForRedirect(), request->url() will have a different value corresponding to the location of the redirect (right?). Theres is no guarantee that the cache identified on the first invocation (with the original url) will contain a resource for this new url, and there may actually be another cache that contains a resource for that new url.

> 
> > Not sure these changes should be here. This method affects subresource loads which should not be affected by the prefer-online setting.
> > 
> XHR load a master entry synchronously should be affected by the prefer-online setting.

XHR always performs subresource loads, "main" vs "sub" is not function of the resource being loaded, its a function of how its being loaded. 

> > After reading the spec, looks like the test for 'Master' should not be here, but a test for 'Foreign' should be here such that 'Foreign' entries will be excluded.
> As mentioned above, a cache included 'Foreign' resource never be picked up, therefore, I think it's fine that we use ASSERT instead of it.

Great, maybe we can ASSERT(!Foreign) here then. But still, I don't see where the test for 'Master' is correct. An explicitly listed resource that's not a 'Master' can also be navigated to and an appcached resource should be utilized in that case too.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list