Unverified Commit 5d5c3fab authored by Anna Henningsen's avatar Anna Henningsen Committed by Michaël Zasso
Browse files

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

PR-URL: https://github.com/nodejs/node/pull/22819


Reviewed-By: default avatarGus Caplan <me@gus.host>
Reviewed-By: default avatarGireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: default avatarEugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: default avatarRefael Ackermann <refack@gmail.com>
parent 5c5d881b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment