Skip to content

Commit

Permalink
src: fix compiler warnings in node_crypto.cc
Browse files Browse the repository at this point in the history
During the time between nodejs#24234
being opened and it landing, a V8 update occurred that deprecated
several APIs. This commit fixes the following compiler warnings:

../src/node_crypto.cc:3342:11:
  warning: 'Set' is deprecated: Use maybe version

../src/node_crypto.cc:3345:13:
  warning: 'GetFunction' is deprecated: Use maybe version

PR-URL: nodejs#25205
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
  • Loading branch information
cjihrig authored and refack committed Jan 10, 2019
1 parent 64dfe81 commit bfec0f9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3339,10 +3339,12 @@ Local<Function> KeyObject::Initialize(Environment* env, Local<Object> target) {
GetAsymmetricKeyType);
env->SetProtoMethod(t, "export", Export);

target->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "KeyObject"),
t->GetFunction(env->context()).ToLocalChecked());
auto function = t->GetFunction(env->context()).ToLocalChecked();
target->Set(env->context(),
FIXED_ONE_BYTE_STRING(env->isolate(), "KeyObject"),
function).FromJust();

return t->GetFunction();
return function;
}

Local<Object> KeyObject::Create(Environment* env,
Expand Down

0 comments on commit bfec0f9

Please sign in to comment.