Bug 214631

Summary: Monitor the case of a fetch event not able to register to the respondWith promise
Product: WebKit Reporter: youenn fablet <youennf>
Component: Service WorkersAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

Description youenn fablet 2020-07-22 02:12:49 PDT
Monitor the case of a fetch event not able to register to the respondWith promise
Comment 1 youenn fablet 2020-07-22 02:18:34 PDT
Created attachment 404909 [details]
Patch
Comment 2 youenn fablet 2020-07-22 04:33:53 PDT
Created attachment 404914 [details]
Patch
Comment 3 youenn fablet 2020-07-23 05:54:02 PDT
Ping review
Comment 4 Alex Christensen 2020-07-23 10:37:18 PDT
Comment on attachment 404914 [details]
Patch

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

> Source/WebCore/bindings/js/JSDOMPromise.h:53
> +    static bool whenPromiseIsSettled(JSDOMGlobalObject*, JSC::JSObject* promise, Function<void()>&&);

I think this needs a 2-state enum.  "true" and "false" don't really make sense here.

> Source/WebCore/workers/service/FetchEvent.cpp:78
> +    bool isRegistered = m_respondPromise->whenSettled([this, protectedThis = makeRef(*this)] () {

() is unnecessary.
Comment 5 youenn fablet 2020-07-24 07:17:01 PDT
Created attachment 405141 [details]
Patch for landing
Comment 6 EWS 2020-07-24 10:18:26 PDT
Committed r264838: <https://trac.webkit.org/changeset/264838>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 405141 [details].
Comment 7 Radar WebKit Bug Importer 2020-07-24 10:19:16 PDT
<rdar://problem/66060529>