From 7dde560beb736e82b7867130a2d5824544122a60 Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Fri, 21 Sep 2018 13:13:35 +0200 Subject: src: replace deprecated uses of FunctionTemplate::GetFunction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/22993 Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig Reviewed-By: Ujjwal Sharma Reviewed-By: Joyee Cheung Reviewed-By: Eugene Ostroukhov Reviewed-By: Anna Henningsen Reviewed-By: James M Snell --- src/uv.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/uv.cc') 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 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) -- cgit v1.2.1