src: refactor `Environment::GetCurrent()` usage
Make Environment::GetCurrent()
return nullptr
if the current
Context
is not a Node.js context, and for the relevant usage of
this function, either:
- Switch to the better
GetCurrent(args)
variant - Turn functions in to no-ops where it makes sense
- Make it a
CHECK
, i.e. an API requirement, where it make sense - Leave a
TODO
comment for verifying what, if anything, is to be done
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines