Bug 250554
| Summary: | Provide public C API for accessing the state and result of a promise | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kasper Isager Dalsgarð <kasperisager> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | gorez.tony, mark.lam, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Mac (Apple Silicon) | ||
| OS: | macOS 13 | ||
Kasper Isager Dalsgarð
The public JavaScriptCore C API is currently missing functions for accessing the state and result of a promise. The private C++ APIs are already there:
https://github.com/WebKit/WebKit/blob/2c3591d6db31967955f974e615d986177db22774/Source/JavaScriptCore/runtime/JSPromise.h#L75-L76
It would also be great with a function for testing if a value is a promise, such as JSValueIsPromise().
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/104469141>
gorez.tony
We have the same issue here, the same concerns, be able to:
- get the result of a promise or at least have a way to attach a resolve and reject callbacks when calling `JSObjectCallAsFunction`
- have a JSValueIsPromise helper method