1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-04 04:22:36 +03:00

Fix a shadowed var in opfs-sahpool and add more tests.

FossilOrigin-Name: 9c8a73aff0f291e0c18072372e0d8961d3a05910489598d0d342227d99871954
This commit is contained in:
stephan
2023-07-18 19:27:11 +00:00
parent b0dd9d427f
commit 0649a1a05d
4 changed files with 34 additions and 19 deletions

View File

@ -999,18 +999,18 @@ globalThis.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
//log("vfs list:",capi.sqlite3_js_vfs_list());
if(sqlite3.oo1){
const oo1 = sqlite3.oo1;
const OpfsthePoolDb = function(...args){
const OpfsSAHPoolDb = function(...args){
const opt = oo1.DB.dbCtorHelper.normalizeArgs(...args);
opt.vfs = opfsVfs.$zName;
oo1.DB.dbCtorHelper.call(this, opt);
};
OpfsthePoolDb.prototype = Object.create(oo1.DB.prototype);
OpfsthePoolDb.PoolUtil = poolUtil;
if(!oo1.OpfsthePoolDb){
oo1.OpfsthePoolDb = Object.create(null);
oo1.OpfsthePoolDb.default = OpfsthePoolDb;
OpfsSAHPoolDb.prototype = Object.create(oo1.DB.prototype);
OpfsSAHPoolDb.PoolUtil = poolUtil;
if(!oo1.OpfsSAHPool){
oo1.OpfsSAHPool = Object.create(null);
oo1.OpfsSAHPool.default = OpfsSAHPoolDb;
}
oo1.OpfsthePoolDb[vfsName] = OpfsthePoolDb;
oo1.OpfsSAHPool[vfsName] = OpfsSAHPoolDb;
oo1.DB.dbCtorHelper.setVfsPostOpenSql(
opfsVfs.pointer,
function(oo1Db, sqlite3){