diff --git a/ext/wasm/index.html b/ext/wasm/index.html
index 562bb9b5ef..fc0c33e432 100644
--- a/ext/wasm/index.html
+++ b/ext/wasm/index.html
@@ -50,11 +50,14 @@
worker due to an Emscripten limitation.
scratchpad-opfs-worker:
experimenting with OPFS from a Worker thread (without WASMFS).
- x-sync-async is an
+ test-opfs-vfs
+ (same
+ with verbose output and sanity-checking tests) is an
experiment in implementing a syncronous sqlite3 VFS proxy
- for a fully synchronous backend interface (namely OPFS), using SharedArrayBuffer
- and the Atomics APIs to regulate communication between the synchronous
- interface and the async impl.
+ for a fully asynchronous backend interface (namely OPFS),
+ using SharedArrayBuffer and the Atomics APIs to regulate
+ communication between the synchronous interface and the
+ async impl.
diff --git a/ext/wasm/sqlite3-opfs-async-proxy.js b/ext/wasm/sqlite3-opfs-async-proxy.js
index 58498e006b..00b4025569 100644
--- a/ext/wasm/sqlite3-opfs-async-proxy.js
+++ b/ext/wasm/sqlite3-opfs-async-proxy.js
@@ -260,7 +260,7 @@ const vfsAsyncImpls = {
const fh = __openFiles[fid];
try{
const aRead = new Uint8Array(fh.sab, 0, n);
- const nRead = fh.accessHandle.read(aRead, {at: offset});
+ const nRead = fh.accessHandle.read(aRead, {at: Number(offset)});
if(nRead < n){/* Zero-fill remaining bytes */
new Uint8Array(fh.sab).fill(0, nRead, n);
rc = state.sq3Codes.SQLITE_IOERR_SHORT_READ;
@@ -302,7 +302,8 @@ const vfsAsyncImpls = {
const fh = __openFiles[fid];
try{
affirmNotRO('xWrite', fh);
- const nOut = fh.accessHandle.write(new Uint8Array(fh.sab, 0, n), {at: offset});
+ const nOut = fh.accessHandle.write(new Uint8Array(fh.sab, 0, n),
+ {at: Number(offset)});
rc = (nOut===n) ? 0 : state.sq3Codes.SQLITE_IOERR_WRITE;
}catch(e){
error("xWrite():",e,fh);
diff --git a/ext/wasm/x-sync-async.html b/ext/wasm/test-opfs-vfs.html
similarity index 91%
rename from ext/wasm/x-sync-async.html
rename to ext/wasm/test-opfs-vfs.html
index b83d93378c..6e470ecc88 100644
--- a/ext/wasm/x-sync-async.html
+++ b/ext/wasm/test-opfs-vfs.html
@@ -17,6 +17,6 @@
-
+