diff options
Diffstat (limited to 'ext/wasm/api/sqlite3-vfs-opfs.c-pp.js')
-rw-r--r-- | ext/wasm/api/sqlite3-vfs-opfs.c-pp.js | 24 |
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*/; |