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:
Mahesh Bandara Wijerathna
2026-03-16 15:19:23 +05:30
co-authored by Matthew McEachen
parent 79c212e0f4
commit 2ce1b97088
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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)));
}
+1 -1
View File
@@ -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);
}