src: keep main-thread Isolate attached to platform during Dispose by addaleax · Pull Request #31795 · nodejs/node

@addaleax

This works around a situation in which the V8 WASM code calls
into the platform while the Isolate is being disposed.

This goes against the V8 API constract for `v8::Platform`.
In lieu of a proper fix, it should be okay to keep the Isolate
registered; the race condition fixed by 25447d8 cannot
occur for the `NodeMainInstance`’s Isolate, as it is the last
one to exit in any given Node.js process.

This partially reverts 25447d8.

Refs: nodejs#30909
Refs: nodejs#31752

@nodejs-github-bot added c++

Issues and PRs that require attention from people who are familiar with C++.

process

Issues and PRs related to the process subsystem.

labels

Feb 14, 2020

@addaleax addaleax added fast-track

PRs that do not need to wait for 72 hours to land.

lib / src

Issues and PRs related to general changes in the lib or src directory.

and removed process

Issues and PRs related to the process subsystem.

labels

Feb 14, 2020

lundibundi

@addaleax addaleax deleted the node-main-instance-isolate-dispose-order branch

February 14, 2020 16:15

addaleax added a commit that referenced this pull request

Feb 14, 2020
This works around a situation in which the V8 WASM code calls
into the platform while the Isolate is being disposed.

This goes against the V8 API constract for `v8::Platform`.
In lieu of a proper fix, it should be okay to keep the Isolate
registered; the race condition fixed by 25447d8 cannot
occur for the `NodeMainInstance`’s Isolate, as it is the last
one to exit in any given Node.js process.

This partially reverts 25447d8.

Refs: #30909
Refs: #31752

PR-URL: #31795
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

addaleax added a commit that referenced this pull request

Feb 14, 2020
This works around a situation in which the V8 WASM code calls
into the platform while the Isolate is being disposed.

This goes against the V8 API constract for `v8::Platform`.
In lieu of a proper fix, it should be okay to keep the Isolate
registered; the race condition fixed by 25447d8 cannot
occur for the `NodeMainInstance`’s Isolate, as it is the last
one to exit in any given Node.js process.

This partially reverts 25447d8.

Refs: #30909
Refs: #31752

PR-URL: #31795
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

codebytere pushed a commit that referenced this pull request

Feb 17, 2020
This works around a situation in which the V8 WASM code calls
into the platform while the Isolate is being disposed.

This goes against the V8 API constract for `v8::Platform`.
In lieu of a proper fix, it should be okay to keep the Isolate
registered; the race condition fixed by 25447d8 cannot
occur for the `NodeMainInstance`’s Isolate, as it is the last
one to exit in any given Node.js process.

This partially reverts 25447d8.

Refs: #30909
Refs: #31752

PR-URL: #31795
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

addaleax added a commit to addaleax/node that referenced this pull request

Feb 18, 2020

addaleax added a commit to addaleax/node that referenced this pull request

Feb 18, 2020
…pose"

This reverts commit e460f8c.

It is no longer necessary after the previous commit, and restores
consistency of the call order between the main thread code,
the other call sites, and the documentation.

Refs: nodejs#31795

addaleax added a commit that referenced this pull request

Mar 11, 2020

addaleax added a commit that referenced this pull request

Mar 11, 2020
…pose"

This reverts commit e460f8c.

It is no longer necessary after the previous commit, and restores
consistency of the call order between the main thread code,
the other call sites, and the documentation.

Refs: #31795
PR-URL: #31853
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

MylesBorins pushed a commit that referenced this pull request

Mar 11, 2020

MylesBorins pushed a commit that referenced this pull request

Mar 11, 2020
…pose"

This reverts commit e460f8c.

It is no longer necessary after the previous commit, and restores
consistency of the call order between the main thread code,
the other call sites, and the documentation.

Refs: #31795
PR-URL: #31853
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

codebytere pushed a commit that referenced this pull request

Mar 21, 2020

codebytere pushed a commit that referenced this pull request

Mar 23, 2020

codebytere pushed a commit that referenced this pull request

Mar 30, 2020

targos pushed a commit to targos/node that referenced this pull request

Apr 25, 2020
…pose"

This reverts commit e460f8c.

It is no longer necessary after the previous commit, and restores
consistency of the call order between the main thread code,
the other call sites, and the documentation.

Refs: nodejs#31795
PR-URL: nodejs#31853
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>

targos pushed a commit that referenced this pull request

Apr 28, 2020
…pose"

This reverts commit e460f8c.

It is no longer necessary after the previous commit, and restores
consistency of the call order between the main thread code,
the other call sites, and the documentation.

Refs: #31795
PR-URL: #31853
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>