Bug 214631 - Monitor the case of a fetch event not able to register to the respondWith promise
Summary: Monitor the case of a fetch event not able to register to the respondWith pro...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-22 02:12 PDT by youenn fablet
Modified: 2020-07-24 10:19 PDT (History)
3 users (show)

See Also:


Attachments
Patch (5.03 KB, patch)
2020-07-22 02:18 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (5.03 KB, patch)
2020-07-22 04:33 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (5.24 KB, patch)
2020-07-24 07:17 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>