Bug 182535 - Service workers registrations are saved to disk before the install / activation succeeds
Summary: Service workers registrations are saved to disk before the install / activati...
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: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-02-06 09:38 PST by Chris Dumez
Modified: 2018-02-06 10:43 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.58 KB, patch)
2018-02-06 09:43 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (2.58 KB, patch)
2018-02-06 10:08 PST, 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 2018-02-06 09:38:55 PST
Service workers registrations are saved to disk before the install / activation succeeds. This means if the browser exists before the install / activation succeeds, we may restore from disk a registration with an “active” worker which may have never been installed / activated.
Comment 1 Chris Dumez 2018-02-06 09:39:08 PST
<rdar://problem/36591485>
Comment 2 Chris Dumez 2018-02-06 09:43:07 PST
Created attachment 333182 [details]
Patch
Comment 3 youenn fablet 2018-02-06 10:03:39 PST
Comment on attachment 333182 [details]
Patch

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

> Source/WebCore/ChangeLog:10
> +        This means if the browser exists before the install / activation succeeds, we may restore

s/exists/exits

> Source/WebCore/ChangeLog:12
> +        activated.

Indeed, this is in particular important for service worker doing some cache storage operations only in install step.
Comment 4 Chris Dumez 2018-02-06 10:08:49 PST
Created attachment 333186 [details]
Patch
Comment 5 WebKit Commit Bot 2018-02-06 10:43:54 PST
Comment on attachment 333186 [details]
Patch

Clearing flags on attachment: 333186

Committed r228180: <https://trac.webkit.org/changeset/228180>
Comment 6 WebKit Commit Bot 2018-02-06 10:43:56 PST
All reviewed patches have been landed.  Closing bug.