diff --git a/src/node.cc b/src/node.cc index 3ee25ebbd67a01..acf4f0fac03c0b 100644 --- a/src/node.cc +++ b/src/node.cc @@ -147,7 +147,7 @@ unsigned int reverted_cve = 0; // util.h // 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(). bool v8_initialized = false; // node_internals.h diff --git a/src/node_errors.cc b/src/node_errors.cc index 0e4ba26e1bcb70..3028892b0807e3 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -430,7 +430,7 @@ void OnFatalError(const char* location, const char* message) { FPrintF(stderr, "FATAL ERROR: %s\n", message); } - Isolate* isolate = Isolate::GetCurrent(); + Isolate* isolate = Isolate::TryGetCurrent(); Environment* env = nullptr; if (isolate != nullptr) { env = Environment::GetCurrent(isolate); diff --git a/src/util.cc b/src/util.cc index e181fdf568cd18..bae5a47a06d8de 100644 --- a/src/util.cc +++ b/src/util.cc @@ -128,7 +128,7 @@ BufferValue::BufferValue(Isolate* isolate, Local value) { void LowMemoryNotification() { if (per_process::v8_initialized) { - auto isolate = Isolate::GetCurrent(); + auto isolate = Isolate::TryGetCurrent(); if (isolate != nullptr) { isolate->LowMemoryNotification(); } diff --git a/src/util.h b/src/util.h index 050e4bda35a139..43dac02110adbf 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