Bug 178497

Summary: Implement ServiceWorkerRegistration.scope / updateViaCache
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, ben, buildbot, commit-queue, esprehn+autocc, ggaren, kondapallykalyan, rniwa, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar, WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=174541
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

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