[webkit-changes] [WebKit/WebKit] 0e9b29: NativePromise unnecessarily calls crossThreadCopy ...
Jean-Yves Avenard
noreply at github.com
Mon Oct 9 07:56:14 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0e9b295049f8da9354d232b8ab175b30ea65a0cb
https://github.com/WebKit/WebKit/commit/0e9b295049f8da9354d232b8ab175b30ea65a0cb
Author: Jean-Yves Avenard <jya at apple.com>
Date: 2023-10-09 (Mon, 09 Oct 2023)
Changed paths:
M Source/WTF/wtf/NativePromise.h
M Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp
Log Message:
-----------
NativePromise unnecessarily calls crossThreadCopy with the completion promise
https://bugs.webkit.org/show_bug.cgi?id=262660
rdar://116489817
Reviewed by Youenn Fablet.
Avoid copying the data when not needed by separating the code path from
the standard resolve/reject from chained promise resolution.
Add API test to verify that the value isn't incorrectly moved for non-exclusive
promise.
* Source/WTF/wtf/NativePromise.h:
* Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/269075@main
More information about the webkit-changes
mailing list