Skip to content

src: add public wrapper for Environment::GetCurrent

Follow-up for https://github.com/nodejs/node/pull/23672; this PR adds a public wrapper for Environment::GetCurrent in order to allow embedders like Electron access to the current environment without having to use private APIs and experience issues around private members like Environment::kNodeContextTagPtr.

Also adds a test to ensure that this new wrapper does not break on future changes.

/cc @addaleax

Checklist

Merge request reports

Loading