-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to settle a NativePromise with a function which will be r…
…un on the dispatcher given to then/whenSettled https://bugs.webkit.org/show_bug.cgi?id=270282 rdar://123830373 Reviewed by Youenn Fablet. We add a settleWithFunction method to NativePromiseProducer. For convenience, you can also pass the Function to settle(). The function provided will be run for in listener's dispatcher and the result be then passed to the callback. Fly-by: Make accessing the promise's result more explicit (such as when is the result accessed by reference or being moved) Added API tests. * Source/WTF/wtf/NativePromise.h: * Tools/TestWebKitAPI/Tests/WTF/NativePromise.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/275720@main
- Loading branch information
Showing
2 changed files
with
169 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters