[webkit-changes] [WebKit/WebKit] bb71e9: NativePromise should allow void as reject type.

Jean-Yves Avenard noreply at github.com
Mon Nov 20 18:04:56 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bb71e93437b5212b6aa81071e0881fb68d70dffe
      https://github.com/WebKit/WebKit/commit/bb71e93437b5212b6aa81071e0881fb68d70dffe
  Author: Jean-Yves Avenard <jya at apple.com>
  Date:   2023-11-20 (Mon, 20 Nov 2023)

  Changed paths:
    M Source/WTF/wtf/Forward.h
    M Source/WTF/wtf/NativePromise.h
    M Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp

  Log Message:
  -----------
  NativePromise should allow void as reject type.
https://bugs.webkit.org/show_bug.cgi?id=265118
rdar://118645560

Reviewed by Youenn Fablet.

Allow to set a NativePromise where RejectValueT is void.
Set GenericPromis and GenericNonExclusive to be NativePromise<void, void>

Add API tests and update existing API test using GenericPromise

* Source/WTF/wtf/Forward.h:
* Source/WTF/wtf/NativePromise.h:
* Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp:
(TestWebKitAPI::doFail):
(TestWebKitAPI::TEST):
(TestWebKitAPI::std::function<void): Deleted.

Canonical link: https://commits.webkit.org/270995@main




More information about the webkit-changes mailing list