Bug 204678 - Move soft update handling to network process
Summary: Move soft update handling to network process
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on: 204641
Blocks:
  Show dependency treegraph
 
Reported: 2019-11-28 05:39 PST by youenn fablet
Modified: 2019-12-04 05:48 PST (History)
7 users (show)

See Also:


Attachments
Patch (70.08 KB, patch)
2019-11-28 05:43 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (74.51 KB, patch)
2019-11-28 06:41 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (75.31 KB, patch)
2019-11-28 08:57 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (80.68 KB, patch)
2019-11-28 23:10 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (75.72 KB, patch)
2019-12-03 01:37 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (75.77 KB, patch)
2019-12-04 03:50 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>