diff options
author | Andreas Haas <ahaas@google.com> | 2018-09-21 14:13:35 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-09-24 06:44:28 +0300 |
commit | 7dde560beb736e82b7867130a2d5824544122a60 (patch) | |
tree | c34d8cdc7be51ceee11ed3160e49acd1270319de /src/pipe_wrap.cc | |
parent | a0c1326257b9679b056d8611ccdee2d6757b0bf0 (diff) |
src: replace deprecated uses of FunctionTemplate::GetFunction
PR-URL: https://github.com/nodejs/node/pull/22993
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/pipe_wrap.cc')
-rw-r--r-- | src/pipe_wrap.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 00c0eef6549..f3317ecc8c2 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -57,7 +57,9 @@ Local<Object> PipeWrap::Instantiate(Environment* env, EscapableHandleScope handle_scope(env->isolate()); AsyncHooks::DefaultTriggerAsyncIdScope trigger_scope(parent); CHECK_EQ(false, env->pipe_constructor_template().IsEmpty()); - Local<Function> constructor = env->pipe_constructor_template()->GetFunction(); + Local<Function> constructor = env->pipe_constructor_template() + ->GetFunction(env->context()) + .ToLocalChecked(); CHECK_EQ(false, constructor.IsEmpty()); Local<Value> type_value = Int32::New(env->isolate(), type); Local<Object> instance = @@ -91,7 +93,7 @@ void PipeWrap::Initialize(Local<Object> target, env->SetProtoMethod(t, "fchmod", Fchmod); - target->Set(pipeString, t->GetFunction()); + target->Set(pipeString, t->GetFunction(env->context()).ToLocalChecked()); env->set_pipe_constructor_template(t); // Create FunctionTemplate for PipeConnectWrap. @@ -100,7 +102,7 @@ void PipeWrap::Initialize(Local<Object> target, Local<String> wrapString = FIXED_ONE_BYTE_STRING(env->isolate(), "PipeConnectWrap"); cwt->SetClassName(wrapString); - target->Set(wrapString, cwt->GetFunction()); + target->Set(wrapString, cwt->GetFunction(env->context()).ToLocalChecked()); // Define constants Local<Object> constants = Object::New(env->isolate()); |