[webkit-changes] [WebKit/WebKit] ab34ea: Allow to chain NativePromise::ThenCommand even if ...
Jean-Yves Avenard
noreply at github.com
Wed Nov 29 03:49:01 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ab34eaa17f5d07b2b3ce0c8d5e3af57f9c29c8a3
https://github.com/WebKit/WebKit/commit/ab34eaa17f5d07b2b3ce0c8d5e3af57f9c29c8a3
Author: Jean-Yves Avenard <jya at apple.com>
Date: 2023-11-29 (Wed, 29 Nov 2023)
Changed paths:
M Source/WTF/wtf/NativePromise.h
M Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp
Log Message:
-----------
Allow to chain NativePromise::ThenCommand even if it returned void
https://bugs.webkit.org/show_bug.cgi?id=265306
rdar://118770512
Reviewed by Youenn Fablet.
When the then/whenSettled handler runs and it returned void, handle it as if a resolved GenericPromise was returned.
Add API test.
* Source/WTF/wtf/NativePromise.h:
* Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp:
(TestWebKitAPI::myMethodReturningThenCommandWithPromise):
(TestWebKitAPI::myMethodReturningThenCommandWithVoid):
(TestWebKitAPI::TEST):
(TestWebKitAPI::myMethodReturningThenCommand): Deleted.
Canonical link: https://commits.webkit.org/271267@main
More information about the webkit-changes
mailing list