diff --git a/src/node.cc b/src/node.cc index 2a18582aeba..c1dbcaa4f3c 100644 --- a/src/node.cc +++ b/src/node.cc @@ -4698,7 +4698,7 @@ static uv_key_t thread_local_env; void AtExit(void (*cb)(void* arg), void* arg) { - auto env = static_cast(uv_key_get(&thread_local_env)); + auto env = node::Environment::GetCurrent(v8::Isolate::GetCurrent()); AtExit(env, cb, arg); }