Skip to content
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

Add v8 patch to preserve async context for custom thenables #1665

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Feb 13, 2024

Patches v8 to allow async context to propgate to async thenables

@Qard ... this probably doesn't tick all of the boxes v8 would need to land this (I skipped tests and there might be some additional debug asserts they'd want in a couple places) but this patch should cover the basics. Could I bother you to give it a once over? ... specifically this patch: patches/v8/0015-Attach-continuation-context-to-Promise-thenable-task.patch

@jasnell jasnell requested review from a team as code owners February 13, 2024 19:26
Copy link

@Qard Qard left a comment

Choose a reason for hiding this comment

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

I believe storing the CPED data may also be required in Factory::NewPromiseResolveThenableJobTask. If I recall correctly, there were some weird cases like new Promise((resolve) => resolve(thenable)) where the CSA changes weren't enough.

@jasnell jasnell force-pushed the jsnell/patch-v8-for-thenable-async-context branch 2 times, most recently from 54633d3 to 5c1501f Compare February 15, 2024 16:30
@jasnell
Copy link
Member Author

jasnell commented Feb 15, 2024

@Qard ... updated to include the factory.cc changes and extended the test to cover that case.

@jasnell jasnell requested a review from Qard February 19, 2024 14:12
Copy link

@Qard Qard left a comment

Choose a reason for hiding this comment

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

That should do it. LGTM. 👍🏻

@jasnell
Copy link
Member Author

jasnell commented Feb 19, 2024

Thank you @Qard !

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.

3 participants