Bug 180359

Summary: Add support https://w3c.github.io/ServiceWorker/#on-client-unload-algorithm
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, cdumez, commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

youenn fablet
Reported 2017-12-04 09:05:41 PST
Attachments
Patch (2.81 KB, patch)
2017-12-04 09:42 PST, youenn fablet
no flags
youenn fablet
Comment 1 2017-12-04 09:42:18 PST
Chris Dumez
Comment 2 2017-12-04 10:24:33 PST
Comment on attachment 328354 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=328354&action=review > Source/WebCore/workers/service/server/SWServerRegistration.cpp:165 > + handleClientUnload(); This looks wrong to me. The fact that removeClientUsingRegistration() is called does not necessarily mean a client was unloaded.
Chris Dumez
Comment 3 2017-12-04 10:26:09 PST
Comment on attachment 328354 [details] Patch I guess it does not matter though because the algorithm is a no-op when the unloaded client is not using the registration.
Chris Dumez
Comment 4 2017-12-04 10:29:06 PST
Comment on attachment 328354 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=328354&action=review yeah, seems fine given the client unload algorithm. > Source/WebCore/workers/service/server/SWServerRegistration.cpp:293 > + return; Technically the spec does not return here. I don't know if is matters or if it is a bug in the spec. Do we ever want to call tryActivate() on a registration that is uninstalling?
youenn fablet
Comment 5 2017-12-04 10:35:42 PST
(In reply to Chris Dumez from comment #4) > Comment on attachment 328354 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=328354&action=review > > yeah, seems fine given the client unload algorithm. > > > Source/WebCore/workers/service/server/SWServerRegistration.cpp:293 > > + return; > > Technically the spec does not return here. I don't know if is matters or if > it is a bug in the spec. Do we ever want to call tryActivate() on a > registration that is uninstalling? Right, spec could be made clearer here.
WebKit Commit Bot
Comment 6 2017-12-04 10:55:11 PST
Comment on attachment 328354 [details] Patch Clearing flags on attachment: 328354 Committed r225483: <https://trac.webkit.org/changeset/225483>
WebKit Commit Bot
Comment 7 2017-12-04 10:55:12 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2017-12-04 10:56:25 PST
Note You need to log in before you can comment on or make changes to this bug.