Merge pull request #573 from murgatroid99/checkServerIdentity_cb_fix

Native: Use non-deprecated function to call checkServerIdentity cb
This commit is contained in:
Nicolas Noble 2018-10-16 21:14:31 -07:00 committed by GitHub
commit fae76dec4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ static int verify_peer_callback_wrapper(const char* servername, const char* cert
argv[1] = Nan::New<v8::String>(cert).ToLocalChecked();
}
Local<Value> result = callback->Call(argc, argv);
MaybeLocal<Value> result = Nan::Call(*callback, argc, argv);
// Catch any exception and return with a distinct status code which indicates this
if (try_catch.HasCaught()) {
@ -86,7 +86,7 @@ static int verify_peer_callback_wrapper(const char* servername, const char* cert
}
// If the result is an error, return a failure
if (result->IsNativeError()) {
if (result.ToLocalChecked()->IsNativeError()) {
return 1;
}