Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
use v8 APIs which accept a context parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftkey committed May 24, 2019
1 parent aa5b403 commit f7a9f9f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/async.cc
Expand Up @@ -190,8 +190,20 @@ void FindCredentialsWorker::HandleOKCallback() {
cred.second.data(),
cred.second.length()).ToLocalChecked();

obj->Set(Nan::New("account").ToLocalChecked(), account);
obj->Set(Nan::New("password").ToLocalChecked(), password);
#ifndef _WIN32
#pragma GCC diagnostic ignored "-Wunused-result"
#endif
obj->Set(
Nan::GetCurrentContext(),
Nan::New("account").ToLocalChecked(),
account);
#ifndef _WIN32
#pragma GCC diagnostic ignored "-Wunused-result"
#endif
obj->Set(
Nan::GetCurrentContext(),
Nan::New("password").ToLocalChecked(),
password);

Nan::Set(val, idx, obj);
++idx;
Expand Down

0 comments on commit f7a9f9f

Please sign in to comment.