mirror of
https://github.com/hanzoai/better-sqlite3-multiple-ciphers.git
synced 2026-09-24 16:57:19 +00:00
fix: use Holder() instead of This() for Electron 41 compatibility
fix: use Holder() instead of This() in PropertyCallbackInfo contexts PropertyCallbackInfo::This() was removed in V8 13.x (Electron 41), causing compilation errors in NODE_GETTER functions. Co-authored-by: Matthew McEachen <[email protected]>
This commit is contained in:
co-authored by
Matthew McEachen
parent
79c212e0f4
commit
2ce1b97088
@@ -448,10 +448,10 @@ NODE_METHOD(Database::JS_unsafeMode) {
|
||||
}
|
||||
|
||||
NODE_GETTER(Database::JS_open) {
|
||||
info.GetReturnValue().Set(Unwrap<Database>(info.This())->open);
|
||||
info.GetReturnValue().Set(Unwrap<Database>(info.Holder())->open);
|
||||
}
|
||||
|
||||
NODE_GETTER(Database::JS_inTransaction) {
|
||||
Database* db = Unwrap<Database>(info.This());
|
||||
Database* db = Unwrap<Database>(info.Holder());
|
||||
info.GetReturnValue().Set(db->open && !static_cast<bool>(sqlite3_get_autocommit(db->db_handle)));
|
||||
}
|
||||
|
||||
@@ -378,6 +378,6 @@ NODE_METHOD(Statement::JS_columns) {
|
||||
}
|
||||
|
||||
NODE_GETTER(Statement::JS_busy) {
|
||||
Statement* stmt = Unwrap<Statement>(info.This());
|
||||
Statement* stmt = Unwrap<Statement>(info.Holder());
|
||||
info.GetReturnValue().Set(stmt->alive && stmt->locked);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user