diff options
author | Anna Henningsen <anna@addaleax.net> | 2021-08-31 12:16:45 +0300 |
---|---|---|
committer | Node.js GitHub Bot <github-bot@iojs.org> | 2021-09-08 21:19:47 +0300 |
commit | 200ed0787989d47a276ff86816cc8b4fbb688360 (patch) | |
tree | c9bf7adbd55c8f025eabb8b9bb8df2ddddb919cf /src/util.h | |
parent | 9f6fed7cc90b05eca1f0b86d10cdd5875a3a5c4c (diff) |
src: use Isolate::TryGetCurrent where appropriate
In two places, we call `Isolate::GetCurrent()` even though that is
technically invalid usage of the function.
Now that V8 exposes `Isolate::TryGetCurrent()`, we can do this
in a proper way.
PR-URL: https://github.com/nodejs/node/pull/39954
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h index 050e4bda35a..43dac02110a 100644 --- a/src/util.h +++ b/src/util.h @@ -91,7 +91,7 @@ inline T MultiplyWithOverflowCheck(T a, T b); namespace per_process { // Tells whether the per-process V8::Initialize() is called and -// if it is safe to call v8::Isolate::GetCurrent(). +// if it is safe to call v8::Isolate::TryGetCurrent(). extern bool v8_initialized; } // namespace per_process |