diff options
Diffstat (limited to 'src/stream_wrap.cc')
-rw-r--r-- | src/stream_wrap.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index 350aae335ae..9738d2a53bd 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -67,7 +67,7 @@ void LibuvStreamWrap::Initialize(Local<Object> target, FIXED_ONE_BYTE_STRING(env->isolate(), "ShutdownWrap"); sw->SetClassName(wrapString); AsyncWrap::AddWrapMethods(env, sw); - target->Set(wrapString, sw->GetFunction()); + target->Set(wrapString, sw->GetFunction(env->context()).ToLocalChecked()); env->set_shutdown_wrap_template(sw->InstanceTemplate()); Local<FunctionTemplate> ww = @@ -77,7 +77,8 @@ void LibuvStreamWrap::Initialize(Local<Object> target, FIXED_ONE_BYTE_STRING(env->isolate(), "WriteWrap"); ww->SetClassName(writeWrapString); AsyncWrap::AddWrapMethods(env, ww); - target->Set(writeWrapString, ww->GetFunction()); + target->Set(writeWrapString, + ww->GetFunction(env->context()).ToLocalChecked()); env->set_write_wrap_template(ww->InstanceTemplate()); } |