Bug 182416

Summary: When SW install fails, null out registration.installing before setting worker state to "redundant"
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Service WorkersAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, commit-queue, ggaren, rniwa, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/w3c/ServiceWorker/issues/1273
Attachments:
Description Flags
Patch
none
Patch none

Chris Dumez
Reported 2018-02-01 18:55:52 PST
When SW install fails, null out registration.installing before setting worker state to "redundant". This does not match the spec but this is what Firefox and Chrome do. This is also what the web-platform-tests expect.
Attachments
Patch (7.85 KB, patch)
2018-02-01 19:02 PST, Chris Dumez
no flags
Patch (7.64 KB, patch)
2018-02-01 20:49 PST, Chris Dumez
no flags
Radar WebKit Bug Importer
Comment 1 2018-02-01 18:57:28 PST
Chris Dumez
Comment 2 2018-02-01 19:02:55 PST
youenn fablet
Comment 3 2018-02-01 20:21:42 PST
Comment on attachment 332931 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=332931&action=review > Source/WebCore/ChangeLog:10 > + This does not match the spec but this is what Firefox and Chrome do. This is also what the Change makes sense to me. Can we file an issue against the spec? > LayoutTests/ChangeLog:9 > + Add layout test coverage. I have verified that this test is passing in both Firefox and Chrome. Since this test is useful to ensure interop with Chrome and Firefox will be kept, it would be good to make this as a WPT test. Given how the test is simple, making it a WPT test should be straightforward. > LayoutTests/http/tests/workers/service/resources/install-fails-worker.js:5 > + }, 10); I am not clear why we need to have a 10 millisecond timer there. Cannot we just write "event.waitUntil(Promise.reject());"
Chris Dumez
Comment 4 2018-02-01 20:47:07 PST
Comment on attachment 332931 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=332931&action=review >> Source/WebCore/ChangeLog:10 >> + This does not match the spec but this is what Firefox and Chrome do. This is also what the > > Change makes sense to me. Can we file an issue against the spec? Yes. I'll do that. >> LayoutTests/ChangeLog:9 >> + Add layout test coverage. I have verified that this test is passing in both Firefox and Chrome. > > Since this test is useful to ensure interop with Chrome and Firefox will be kept, it would be good to make this as a WPT test. > Given how the test is simple, making it a WPT test should be straightforward. Are you not satisfied with the existing WPT test? I wrote this one for clarity and to cover only the exact case. However, the WPT test does cover this change since it started passing. >> LayoutTests/http/tests/workers/service/resources/install-fails-worker.js:5 >> + }, 10); > > I am not clear why we need to have a 10 millisecond timer there. > Cannot we just write "event.waitUntil(Promise.reject());" Ok.
Chris Dumez
Comment 5 2018-02-01 20:49:02 PST
WebKit Commit Bot
Comment 6 2018-02-01 23:09:30 PST
Comment on attachment 332936 [details] Patch Clearing flags on attachment: 332936 Committed r227997: <https://trac.webkit.org/changeset/227997>
WebKit Commit Bot
Comment 7 2018-02-01 23:09:32 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.