diff options
Diffstat (limited to 'src/uv.cc')
-rw-r--r-- | src/uv.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/uv.cc b/src/uv.cc index da67fce8039..3d070a32bdb 100644 --- a/src/uv.cc +++ b/src/uv.cc @@ -57,7 +57,9 @@ void Initialize(Local<Object> target, Environment* env = Environment::GetCurrent(context); Isolate* isolate = env->isolate(); target->Set(FIXED_ONE_BYTE_STRING(isolate, "errname"), - env->NewFunctionTemplate(ErrName)->GetFunction()); + env->NewFunctionTemplate(ErrName) + ->GetFunction(env->context()) + .ToLocalChecked()); #define V(name, _) NODE_DEFINE_CONSTANT(target, UV_##name); UV_ERRNO_MAP(V) |