Bug 230603

Summary: DOMPromiseDeferred should be able to handle Ref/RefPtr resolution values for interface types
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, sam, sergio, sihui_liu, tommyw, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

youenn fablet
Reported 2021-09-22 01:32:27 PDT
DOMPromiseDeferred should be able to handle Ref/RefPtr resolution values for interface types
Attachments
Patch (12.27 KB, patch)
2021-09-22 01:50 PDT, youenn fablet
no flags
Patch for landing (12.25 KB, patch)
2021-09-23 11:31 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2021-09-22 01:50:31 PDT
youenn fablet
Comment 2 2021-09-22 05:17:28 PDT
Comment on attachment 438934 [details] Patch win failure seems unrelated
Sihui Liu
Comment 3 2021-09-23 08:47:06 PDT
Comment on attachment 438934 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=438934&action=review Nice, r=me with nits. > Source/WebCore/ChangeLog:10 > + Small refactring to use reject instead of settle in ApplePaySetup. refactoring > Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:90 > + Function<void(ExceptionOr<Ref<RTCCertificate>>&&)> m_resultCallback; Do we want Function or CompletionHandler (is this function called multiple times)? If we use Function, can we use std::exchange instead of WTFMove?
youenn fablet
Comment 4 2021-09-23 11:30:02 PDT
Comment on attachment 438934 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=438934&action=review >> Source/WebCore/ChangeLog:10 >> + Small refactring to use reject instead of settle in ApplePaySetup. > > refactoring Will change >> Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:90 >> + Function<void(ExceptionOr<Ref<RTCCertificate>>&&)> m_resultCallback; > > Do we want Function or CompletionHandler (is this function called multiple times)? > If we use Function, can we use std::exchange instead of WTFMove? Function is fine, it will only be called once but there is no guarantee that it will always be called. We could use exchange but, given we do not reuse RTCCertificateGeneratorCallback, it is equivalent but more verbose than WTFMove.
youenn fablet
Comment 5 2021-09-23 11:31:02 PDT
Created attachment 439072 [details] Patch for landing
EWS
Comment 6 2021-09-24 00:11:53 PDT
Committed r283028 (242088@main): <https://commits.webkit.org/242088@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 439072 [details].
Radar WebKit Bug Importer
Comment 7 2021-09-24 00:12:17 PDT
Note You need to log in before you can comment on or make changes to this bug.