Skip to content

Commit

Permalink
use Nan::ForceSet to avoid v8 deprecation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Sep 22, 2017
1 parent fa77a07 commit e3f5002
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/database.cc
Expand Up @@ -130,8 +130,8 @@ NAN_METHOD(Database::New) {
Database* db = new Database();
db->Wrap(info.This());

info.This()->ForceSet(Nan::New("filename").ToLocalChecked(), info[0].As<String>(), ReadOnly);
info.This()->ForceSet(Nan::New("mode").ToLocalChecked(), Nan::New(mode), ReadOnly);
Nan::ForceSet(info.This(), Nan::New("filename").ToLocalChecked(), info[0].As<String>(), ReadOnly);
Nan::ForceSet(info.This(), Nan::New("mode").ToLocalChecked(), Nan::New(mode), ReadOnly);

// Start opening the database.
OpenBaton* baton = new OpenBaton(db, callback, *filename, mode);
Expand Down
2 changes: 1 addition & 1 deletion src/statement.cc
Expand Up @@ -100,7 +100,7 @@ NAN_METHOD(Statement::New) {
Database* db = Nan::ObjectWrap::Unwrap<Database>(info[0].As<Object>());
Local<String> sql = Local<String>::Cast(info[1]);

info.This()->ForceSet(Nan::New("sql").ToLocalChecked(), sql, ReadOnly);
Nan::ForceSet(info.This(),Nan::New("sql").ToLocalChecked(), sql, ReadOnly);

Statement* stmt = new Statement(db);
stmt->Wrap(info.This());
Expand Down

0 comments on commit e3f5002

Please sign in to comment.