Bug 262660

Summary: NativePromise unnecessarily calls crossThreadCopy with the completion promise
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: Web Template FrameworkAssignee: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=262437

Jean-Yves Avenard [:jya]
Reported 2023-10-04 15:40:29 PDT
In bug 262437, changes were made to call crossThreadCopy when needed. When we have a completion promise, which will in its turn be resolved/rejected with the resolve/reject value again, we call once again crossThreadCopy on the value as it's using a common code path for resolving/rejecting it. We could easily distinguish the case from the standard resolve/reject and not call crossThreadCopy() then (though this one is mostly a no-op as we are simply moving the value)
Attachments
Radar WebKit Bug Importer
Comment 1 2023-10-04 15:40:55 PDT
Jean-Yves Avenard [:jya]
Comment 2 2023-10-04 18:01:34 PDT
EWS
Comment 3 2023-10-09 07:54:48 PDT
Committed 269075@main (0e9b295049f8): <https://commits.webkit.org/269075@main> Reviewed commits have been landed. Closing PR #18664 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.