Skip to content

Add promise hooks #1033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2025
Merged

Add promise hooks #1033

merged 1 commit into from
Apr 25, 2025

Conversation

bnoordhuis
Copy link
Contributor

Lets embedders track promise chains. Closely modelled after the V8 API of the same name.

Fixes: #1030

@nabetti1720
Copy link

In order to use this PR in the LLRT project, it needs to be merged into the mainline (and the COMMIT destination referenced in rquickjs needs to be updated).

@bnoordhuis Would it be possible for you to merge this PR in its current state?

@bnoordhuis
Copy link
Contributor Author

I've got a better idea: DelSkayn/rquickjs#453

Copy link
Contributor

@saghul saghul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Lets embedders track promise chains. Closely modelled after
the V8 API of the same name.

Fixes: quickjs-ng#1030
@nabetti1720
Copy link

nabetti1720 commented Apr 23, 2025

I've got a better idea: DelSkayn/rquickjs#453

Thanks to your excellent implementation, We was able to successfully access quickjs-ng's PromiseHook from LLRT. Please see the following (before and after) comments.

awslabs/llrt#947 (comment)

There is still a lot of work to be done on the LLRT implementation and things that need to be confirmed, but there don't appear to be any problems with the engine implementation.

@nabetti1720
Copy link

@bnoordhuis Could you please merge it when you have time?

@bnoordhuis bnoordhuis merged commit bda05fb into quickjs-ng:master Apr 25, 2025
127 checks passed
@bnoordhuis bnoordhuis deleted the fix1030 branch April 25, 2025 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is it possible to hook into an asynchronous function?
3 participants