Skip to content

Conversation

@trop
Copy link
Contributor

@trop trop bot commented Jun 21, 2021

Backport of #29531

See that PR for details.

Notes: fix crashes in debug builds caused by microtasks policy mismatch

indutny and others added 7 commits June 21, 2021 05:06
Microtasks policy should not be updated for the renderer because
`NodeBindings::CreateEnvironment` might be entered with or without
`UvRunOnce()` on stack. One of the examples of such calls is
`window.open()` which is possible to invoke while `uv_run()` is still
running (e.g. with `setImmediate()`).

All in all, it doesn't matter that much which policy we use since
`v8::MicrotasksScope` has a check for the policy in its destructor and
no commits will be made if the policy is `kExplicit`. It is important,
however, to not change the policy in the middle of `UvRunOnce()` so we
should respect whatever we currently have and move on.

Fix: #29463
…index.html

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
…index.html

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jun 21, 2021
@trop trop bot mentioned this pull request Jun 21, 2021
5 tasks
@trop trop bot added 13-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Jun 21, 2021
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jun 21, 2021
@zcbenz zcbenz merged commit 252805d into 13-x-y Jun 21, 2021
@zcbenz zcbenz deleted the trop/13-x-y-bp-fix-microtasks-policy-in-createenvironment-1624251992492 branch June 21, 2021 06:49
@release-clerk
Copy link

release-clerk bot commented Jun 21, 2021

Release Notes Persisted

fix crashes in debug builds caused by microtasks policy mismatch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

13-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.

4 participants