Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ab34eaa17f5d07b2b3ce0c8d5e3af57f9c29c8a3
      
https://github.com/WebKit/WebKit/commit/ab34eaa17f5d07b2b3ce0c8d5e3af57f9c29c8a3
  Author: Jean-Yves Avenard <[email protected]>
  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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to