Skip to content

Commit

Permalink
Fix electron 20 build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Aug 25, 2022
1 parent 587721a commit 65d5e33
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
'target_name': 'better_sqlite3',
'dependencies': ['deps/sqlite3.gyp:sqlite3'],
'sources': ['src/better_sqlite3.cpp'],
'cflags': ['-std=c++14'],
'cflags': ['-std=c++17'],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': ['-std=c++14', '-stdlib=libc++'],
'OTHER_CPLUSPLUSFLAGS': ['-std=c++17', '-stdlib=libc++'],
},
'conditions': [
['OS=="linux"', {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"cli-color": "^2.0.0",
"fs-extra": "^10.0.0",
"mocha": "^8.3.2",
"node-gyp": "^9.1.0",
"nodemark": "^0.3.0",
"sqlite": "^4.0.23",
"sqlite3": "^5.0.2"
Expand Down
5 changes: 2 additions & 3 deletions src/better_sqlite3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ void SetPrototypeGetter (v8::Isolate * isolate, v8::Local <v8::External> data, v
0,
data,
v8::AccessControl::DEFAULT,
v8::PropertyAttribute::None,
v8::AccessorSignature::New(isolate, recv)
v8::PropertyAttribute::None
);
}
#line 4 "./src/util/constants.lzz"
Expand Down Expand Up @@ -1949,7 +1948,7 @@ bool Binder::IsPlainObject (v8::Isolate * isolate, v8::Local <v8::Object> obj)
#line 35 "./src/util/binder.lzz"
{
v8::Local<v8::Value> proto = obj->GetPrototype();
v8::Local<v8::Context> ctx = obj->CreationContext();
v8::Local<v8::Context> ctx = obj->GetCreationContext().ToLocalChecked();
ctx->Enter();
v8::Local<v8::Value> baseProto = v8::Object::New(isolate)->GetPrototype();
ctx->Exit();
Expand Down
2 changes: 1 addition & 1 deletion src/util/binder.lzz
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private:

static bool IsPlainObject(v8::Isolate* isolate, v8::Local<v8::Object> obj) {
v8::Local<v8::Value> proto = obj->GetPrototype();
v8::Local<v8::Context> ctx = obj->CreationContext();
v8::Local<v8::Context> ctx = obj->GetCreationContext().ToLocalChecked();
ctx->Enter();
v8::Local<v8::Value> baseProto = v8::Object::New(isolate)->GetPrototype();
ctx->Exit();
Expand Down
3 changes: 1 addition & 2 deletions src/util/macros.lzz
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ void SetPrototypeGetter(
0,
data,
v8::AccessControl::DEFAULT,
v8::PropertyAttribute::None,
v8::AccessorSignature::New(isolate, recv)
v8::PropertyAttribute::None
);
}

0 comments on commit 65d5e33

Please sign in to comment.