aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-04-19 13:39:13 +0000
committerstephan <stephan@noemail.net>2023-04-19 13:39:13 +0000
commitb669956637b72b20131928398228864fc4304b29 (patch)
treec5e2d69efc6a3346c875a739927d12b51a14f8e0 /ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
parentd9ae63144eebb77e278fc9ba5777e44c61b75caa (diff)
downloadsqlite-b669956637b72b20131928398228864fc4304b29.tar.gz
sqlite-b669956637b72b20131928398228864fc4304b29.zip
Correct use of an undefined symbol in one of the OPFS VFS loading failure error reporting cases (copy/paste error).
FossilOrigin-Name: c81c968b458977b2d6dd2fdd3c3d667f0e7cee069f3715363d0e8aed4e6e8377
Diffstat (limited to 'ext/wasm/api/sqlite3-vfs-opfs.c-pp.js')
-rw-r--r--ext/wasm/api/sqlite3-vfs-opfs.c-pp.js24
1 files changed, 15 insertions, 9 deletions
diff --git a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
index e9dfcf417..2e09aab21 100644
--- a/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
+++ b/ext/wasm/api/sqlite3-vfs-opfs.c-pp.js
@@ -1279,14 +1279,15 @@ const installOpfsVfs = function callee(options){
promiseReject(new Error(data.payload.join(' ')));
break;
case 'opfs-async-loaded':
- /*Arrives as soon as the asyc proxy finishes loading.
- Pass our config and shared state on to the async worker.*/
+ /* Arrives as soon as the asyc proxy finishes loading.
+ Pass our config and shared state on to the async
+ worker. */
W.postMessage({type: 'opfs-async-init',args: state});
break;
- case 'opfs-async-inited':{
- /*Indicates that the async partner has received the 'init'
- and has finished initializing, so the real work can
- begin...*/
+ case 'opfs-async-inited': {
+ /* Indicates that the async partner has received the 'init'
+ and has finished initializing, so the real work can
+ begin... */
if(true===promiseWasRejected){
break /* promise was already rejected via timer */;
}
@@ -1321,10 +1322,15 @@ const installOpfsVfs = function callee(options){
}
break;
}
- default:
- promiseReject(e);
- error("Unexpected message from the async worker:",data);
+ default: {
+ const errMsg = (
+ "Unexpected message from the OPFS async worker: " +
+ JSON.stringify(data)
+ );
+ error(errMsg);
+ promiseReject(new Error(errMsg));
break;
+ }
}/*switch(data.type)*/
}/*W.onmessage()*/;
})/*thePromise*/;