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

fix: allow Node.js to manage microtasks queue #28974

Conversation

trop[bot]
Copy link
Contributor

@trop trop bot commented May 3, 2021

Backport of #28957

See that PR for details.

Notes: Allow Node.js to manage microtasks queue by using explicit microtasks policy before calling uv_run()

When `uv_run()` resulted in invocation of JS functions the microtask
queue checkpoint in Node's CallbackScope was a no-op because the
expected microtask queue policy was `kExplicit` and Electron ran under
`kScoped` policy. This change switches policy to `kExplicit` right
before `uv_run()` and reverts it back to original value after `uv_run()`
completes to provide better compatibility with Node.
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label May 3, 2021
@trop trop bot added 11-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels May 3, 2021
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label May 3, 2021
@jkleinsc jkleinsc merged commit d86d3aa into 11-x-y May 3, 2021
@release-clerk
Copy link

release-clerk bot commented May 3, 2021

Release Notes Persisted

Allow Node.js to manage microtasks queue by using explicit microtasks policy before calling uv_run()

@trop trop bot deleted the trop/11-x-y-bp-fix-allow-node-js-to-manage-microtasks-queue-1620077799440 branch May 3, 2021 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
11-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants