src: refactor `Environment::GetCurrent(isolate)` usage
Environment::GetCurrent(isolate)
usage
src: refactor Do not require an explicit HandleScope
, or the ability to create
one, when using Environment::GetCurrent()
.
isolate->InContext()
is used as an indicator that it is probably
okay to create a HandleScope
, see also the short discussion in
https://github.com/nodejs/node/pull/25775#pullrequestreview-197371049.
Environment
from Context
src: prefer to get We explicitly store the context anyway, and can skip the
extra steps introduced in Environment::GetCurrent()
.
Environment
src: allow running tasks without There is no real reason to assume that V8 tasks would have
to run in a Node.js Context
.
src: forbid handle allocations from Platform tasks
Platform tasks should have their own handle scopes, rather than leak into outer ones.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines