Bug 178497 - Implement ServiceWorkerRegistration.scope / updateViaCache
Summary: Implement ServiceWorkerRegistration.scope / updateViaCache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2017-10-18 18:31 PDT by Chris Dumez
Modified: 2017-10-19 06:14 PDT (History)
10 users (show)

See Also:


Attachments
Patch (25.72 KB, patch)
2017-10-18 18:36 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (25.89 KB, patch)
2017-10-18 19:02 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (25.24 KB, patch)
2017-10-18 19:56 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2017-10-18 18:31:44 PDT
Implement ServiceWorkerRegistration.scope / updateViaCache.
Comment 1 Chris Dumez 2017-10-18 18:36:34 PDT
Created attachment 324194 [details]
Patch
Comment 2 youenn fablet 2017-10-18 18:57:52 PDT
Comment on attachment 324194 [details]
Patch

LGTM once the bots are happy.

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

> Source/WebCore/workers/service/ServiceWorkerRegistration.h:66
>      virtual ScriptExecutionContext* scriptExecutionContext() const;

Can you mark these two as final as well?

> Source/WebCore/workers/service/ServiceWorkerRegistrationData.h:74
> +    decoder >> updateViaCache;

I wonder whether decoder >> key >> identifier >> scopeURL >> updateViaCache would be something we want.
That would match the encoder version nicely but we do not return as early and it is less debuggable.

> Source/WebCore/workers/service/ServiceWorkerRegistrationData.h:78
> +    return {{ WTFMove(*key), WTFMove(*identifier), WTFMove(*scopeURL), WTFMove(*updateViaCache) }};

Does style say to put a space between {{ or }}?
Comment 3 Chris Dumez 2017-10-18 19:02:36 PDT
Created attachment 324196 [details]
Patch
Comment 4 Chris Dumez 2017-10-18 19:56:27 PDT
Created attachment 324204 [details]
Patch
Comment 5 WebKit Commit Bot 2017-10-18 20:29:55 PDT
Comment on attachment 324204 [details]
Patch

Clearing flags on attachment: 324204

Committed r223652: <https://trac.webkit.org/changeset/223652>
Comment 6 WebKit Commit Bot 2017-10-18 20:29:57 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2017-10-18 20:31:17 PDT
<rdar://problem/35067071>
Comment 8 Ben Kelly 2017-10-19 06:14:25 PDT
FYI, there is an open spec issue about updateViaCache:

https://github.com/w3c/ServiceWorker/issues/1189