Files
node/test/parallel
Chengzhong Wu d9d9e62474 src: avoid draining platform tasks at FreeEnvironment
At the point of `FreeEnvironment` and onwards, no JavaScript execution
associated with the Environment should be triggered.

Avoid draining platform tasks that can trigger JavaScript execution in
`FreeEnvironment`. The holder of `node::Environment` should immediately
call `node::MultiIsolatePlatform::UnregisterIsolate` and
`v8::Isolate::Dispose` to cancel pending foreground tasks and join
concurrent tasks after the environment was freed.

`NodePlatform` can properly handle the case in `RunForegroundTask` when
an Isolate out-lives its associated `node::Environment`.

PR-URL: https://github.com/nodejs/node/pull/51290
Fixes: https://github.com/nodejs/node/issues/47748
Fixes: https://github.com/nodejs/node/issues/49344
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-05-16 22:20:48 +00:00
..
2023-11-23 10:47:54 +01:00
2023-11-23 10:47:54 +01:00
2024-03-18 13:46:41 +00:00
2023-10-27 16:45:27 +02:00
2023-07-07 00:06:14 +03:00