summaryrefslogtreecommitdiff
path: root/src/uv.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/uv.cc')
-rw-r--r--src/uv.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/uv.cc b/src/uv.cc
index da67fce803..3d070a32bd 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)