diff --git a/ext/wasm/api/sqlite3-api-opfs.js b/ext/wasm/api/sqlite3-api-opfs.js index e0554e8c0c..62aad0c4bb 100644 --- a/ext/wasm/api/sqlite3-api-opfs.js +++ b/ext/wasm/api/sqlite3-api-opfs.js @@ -560,13 +560,13 @@ sqlite3.installOpfsVfs = function callee(asyncProxyUri = callee.defaultProxyUri) Returns true if the deletion succeeded and fails if it fails, but cannot report the nature of the failure. */ - opfsUtil.deleteEntry = function(fsEntryName,recursive){ + opfsUtil.deleteEntry = function(fsEntryName,recursive=false){ return 0===opRun('xDelete', {filename:fsEntryName, recursive}); }; /** Exactly like deleteEntry() but runs asynchronously. */ - opfsUtil.deleteEntryAsync = async function(fsEntryName,recursive){ + opfsUtil.deleteEntryAsync = async function(fsEntryName,recursive=false){ wMsg('xDeleteNoWait', {filename: fsEntryName, recursive}); }; /** @@ -682,7 +682,7 @@ sqlite3.installOpfsVfs = function callee(asyncProxyUri = callee.defaultProxyUri) so we now know that the state object is no longer subject to being copied by a pending postMessage() call.*/ try { - const rc = capi.sqlite3_vfs_register(opfsVfs.pointer, opfsVfs.$zName); + const rc = capi.sqlite3_vfs_register(opfsVfs.pointer, 0); if(rc){ opfsVfs.dispose(); toss("sqlite3_vfs_register(OPFS) failed with rc",rc); diff --git a/ext/wasm/api/sqlite3-api-prologue.js b/ext/wasm/api/sqlite3-api-prologue.js index bd9779b7ef..7bc42b3683 100644 --- a/ext/wasm/api/sqlite3-api-prologue.js +++ b/ext/wasm/api/sqlite3-api-prologue.js @@ -813,6 +813,22 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap( } }; + /** + Returns an array of the names of all currently-registered sqlite3 + VFSes. + */ + capi.sqlite3_web_vfs_list = function(){ + const rc = []; + let pVfs = capi.sqlite3_vfs_find(0); + while(pVfs){ + const oVfs = new capi.sqlite3_vfs(pVfs); + rc.push(capi.wasm.cstringToJs(oVfs.$zName)); + pVfs = oVfs.$pNext; + oVfs.dispose(); + } + return rc; + }; + if( self.window===self ){ /* Features specific to the main window thread... */ diff --git a/ext/wasm/speedtest1-wasmfs.html b/ext/wasm/speedtest1-wasmfs.html index c8e93f6dcf..d0400f7e76 100644 --- a/ext/wasm/speedtest1-wasmfs.html +++ b/ext/wasm/speedtest1-wasmfs.html @@ -114,8 +114,7 @@ const urlArgs = self.SqliteTestUtil.processUrlArgs(); const argv = ["speedtest1"]; if(urlArgs.flags){ - // transform flags=a,b,c to ["--a", "--b", "--c"] - argv.push(...(urlArgs.flags.split(',').map((v)=>'--'+v))); + argv.push(...(urlArgs.flags.split(','))); }else{ argv.push( "--singlethread", diff --git a/ext/wasm/speedtest1-worker.html b/ext/wasm/speedtest1-worker.html index bc3f10a6fc..38eff5cb27 100644 --- a/ext/wasm/speedtest1-worker.html +++ b/ext/wasm/speedtest1-worker.html @@ -126,7 +126,6 @@ justify-content: flex-start; } -