Issue #2435 - Implement notifying of rejected promises

Based-on: m-c 1362272
This commit is contained in:
Martok 2024-01-02 17:23:39 +01:00 committed by roytam1
commit 9126a4836f
4 changed files with 165 additions and 2 deletions

View file

@ -4611,6 +4611,15 @@ GetPromiseID(JS::HandleObject promise);
extern JS_PUBLIC_API(JS::Value)
GetPromiseResult(JS::HandleObject promise);
/**
* Returns whether the given promise's rejection is already handled or not.
*
* The caller must check the given promise is rejected before checking it's
* handled or not.
*/
extern JS_PUBLIC_API(bool)
GetPromiseIsHandled(JS::HandleObject promise);
/**
* Returns a js::SavedFrame linked list of the stack that lead to the given
* Promise's allocation.