Bug 204678

Summary: Move soft update handling to network process
Product: WebKit Reporter: youenn fablet <youennf>
Component: Service WorkersAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, commit-queue, dbates, ews-watchlist, mkwst, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 204641    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch for landing none

Description youenn fablet 2019-11-28 05:39:59 PST
Move soft update handling to network process
Comment 1 youenn fablet 2019-11-28 05:43:21 PST
Created attachment 384450 [details]
Patch
Comment 2 youenn fablet 2019-11-28 06:41:49 PST
Created attachment 384454 [details]
Patch
Comment 3 youenn fablet 2019-11-28 08:57:47 PST
Created attachment 384459 [details]
Patch
Comment 4 youenn fablet 2019-11-28 23:10:35 PST
Created attachment 384480 [details]
Patch
Comment 5 youenn fablet 2019-12-03 01:37:32 PST
Created attachment 384697 [details]
Patch
Comment 6 Chris Dumez 2019-12-03 12:00:45 PST
Comment on attachment 384697 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=384697&action=review

> Source/WebCore/workers/service/ServiceWorkerJobData.cpp:79
> +        return scopeURL == job.scopeURL

Some of these checks may need to be case insensitive.

> Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.h:55
> +    ServiceWorkerSoftUpdateLoader(NetworkSession&, WebCore::ServiceWorkerJobData&&, bool shouldRefreshCache, WebCore::ResourceRequest&&, Handler&&);

This should probably not be public, as clients are expected to call start().
Comment 7 youenn fablet 2019-12-04 03:19:02 PST
(In reply to Chris Dumez from comment #6)
> Comment on attachment 384697 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=384697&action=review
> 
> > Source/WebCore/workers/service/ServiceWorkerJobData.cpp:79
> > +        return scopeURL == job.scopeURL
> 
> Some of these checks may need to be case insensitive.

Both script and scope are URLs.

We do URL string comparison for job when matching registration.
'HTTP://example.org/I' will then have a different scope compared to 'HTTP://example.org/i'. This is consistent.
I believe we should do the same for scripts as well.

> > Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.h:55
> > +    ServiceWorkerSoftUpdateLoader(NetworkSession&, WebCore::ServiceWorkerJobData&&, bool shouldRefreshCache, WebCore::ResourceRequest&&, Handler&&);
> 
> This should probably not be public, as clients are expected to call start().

OK
Comment 8 youenn fablet 2019-12-04 03:50:21 PST
Created attachment 384802 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2019-12-04 05:47:58 PST
Comment on attachment 384802 [details]
Patch for landing

Clearing flags on attachment: 384802

Committed r253102: <https://trac.webkit.org/changeset/253102>
Comment 10 WebKit Commit Bot 2019-12-04 05:47:59 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2019-12-04 05:48:18 PST
<rdar://problem/57622145>