aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-prologue.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-09-24 07:36:45 +0000
committerstephan <stephan@noemail.net>2022-09-24 07:36:45 +0000
commit60d9aa7c59319948535b0ca4cce99b7f389ec447 (patch)
tree8c0eec3bce374d4f862611f22dcf622ef3097fb2 /ext/wasm/api/sqlite3-api-prologue.js
parentf75c0c703697a2f1eea678e92f91982b56ca7cbf (diff)
downloadsqlite-60d9aa7c59319948535b0ca4cce99b7f389ec447.tar.gz
sqlite-60d9aa7c59319948535b0ca4cce99b7f389ec447.zip
Refactoring towards getting fiddle to support OPFS as a first-class citizen. Certain operations, e.g. import, export, and unlink, are not OPFS-aware.
FossilOrigin-Name: 1b923ed6438d7fef4508936e0c4bc026a368721698b1539961e3fb3140a185cb
Diffstat (limited to 'ext/wasm/api/sqlite3-api-prologue.js')
-rw-r--r--ext/wasm/api/sqlite3-api-prologue.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/wasm/api/sqlite3-api-prologue.js b/ext/wasm/api/sqlite3-api-prologue.js
index 1e2d387a1..639ad99c6 100644
--- a/ext/wasm/api/sqlite3-api-prologue.js
+++ b/ext/wasm/api/sqlite3-api-prologue.js
@@ -148,7 +148,11 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
exports: undefined,
memory: undefined,
bigIntEnabled: (()=>{
- if('undefined'!==typeof Module) return !!Module.HEAPU64;
+ if('undefined'!==typeof Module){
+ /* Emscripten module will contain HEAPU64 when build with
+ -sWASM_BIGINT=1, else it will not. */
+ return !!Module.HEAPU64;
+ }
return !!self.BigInt64Array;
})(),
allocExportName: 'malloc',
@@ -771,7 +775,8 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
return (p && name) ? name.startsWith(p+'/') : false;
};
- if(0===capi.wasm.exports.sqlite3_vfs_find(0)){
+ // This bit is highly arguable and is incompatible with the fiddle shell.
+ if(false && 0===capi.wasm.exports.sqlite3_vfs_find(0)){
/* Assume that sqlite3_initialize() has not yet been called.
This will be the case in an SQLITE_OS_KV build. */
capi.wasm.exports.sqlite3_initialize();