SW: Make sure ServiceWorker loading and requests are correctly cleared by ITP
<rdar://problem/35132091>
Created attachment 331955 [details] Patch
Comment on attachment 331955 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=331955&action=review Looks good to me. Not a reviewer though. > Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp:62 > + WebsiteDataType::DOMCache, This will make ITP start clearing DOM cache on non-SW too. I assume that's what you want.
(In reply to John Wilander from comment #3) > Comment on attachment 331955 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=331955&action=review > > Looks good to me. Not a reviewer though. > > > Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp:62 > > + WebsiteDataType::DOMCache, > > This will make ITP start clearing DOM cache on non-SW too. I assume that's > what you want. Yes, DOMCache is not very different from IDB except that it is request/response specific.
Comment on attachment 331955 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=331955&action=review > Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp:73 > + WebsiteDataType::ServiceWorkerRegistrations, Why do we want to clear SW registrations? To maintain any state, the SW would have to use an API such as DOMCache or IDB no?
(In reply to Chris Dumez from comment #5) > Comment on attachment 331955 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=331955&action=review > > > Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp:73 > > + WebsiteDataType::ServiceWorkerRegistrations, > > Why do we want to clear SW registrations? To maintain any state, the SW > would have to use an API such as DOMCache or IDB no? John might know more but I would think that the JavaScript might contain a token that is specific for every fetch of the JavaScript that is not conditional.
(In reply to Chris Dumez from comment #5) > Comment on attachment 331955 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=331955&action=review > > > Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp:73 > > + WebsiteDataType::ServiceWorkerRegistrations, > > Why do we want to clear SW registrations? To maintain any state, the SW > would have to use an API such as DOMCache or IDB no? Can the registration itself can be used as state? Can a third party make registrations look different in any way across sites?
> John might know more but I would think that the JavaScript might contain a > token that is specific for every fetch of the JavaScript that is not > conditional. When JS fetch is conditional, it would obviously return a 304.
Comment on attachment 331955 [details] Patch Clearing flags on attachment: 331955 Committed r227358: <https://trac.webkit.org/changeset/227358>
All reviewed patches have been landed. Closing bug.