aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-07-13 10:41:41 +0000
committerstephan <stephan@noemail.net>2023-07-13 10:41:41 +0000
commitd41d454fc1e95a6b8d92dd143667392f8effd5d6 (patch)
tree0e246e622746244f7a9875189b651c6755ac94eb /ext/wasm/api
parent0f0e5700ba0c88de229eacb797d87551d987cf33 (diff)
downloadsqlite-d41d454fc1e95a6b8d92dd143667392f8effd5d6.tar.gz
sqlite-d41d454fc1e95a6b8d92dd143667392f8effd5d6.zip
More work on the wasmfs build. Resolve the inconsistent argument type passed to sqlite3InitModule() in such builds.
FossilOrigin-Name: 4850a9e2d2b41b91e91b9ef99a6d26ddf11a161b4c970fc00d2d095606729a04
Diffstat (limited to 'ext/wasm/api')
-rw-r--r--ext/wasm/api/extern-post-js.c-pp.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/ext/wasm/api/extern-post-js.c-pp.js b/ext/wasm/api/extern-post-js.c-pp.js
index 6b544fe1c..fac00370d 100644
--- a/ext/wasm/api/extern-post-js.c-pp.js
+++ b/ext/wasm/api/extern-post-js.c-pp.js
@@ -63,18 +63,16 @@ const toExportForESM =
//console.warn("Using replaced sqlite3InitModule()",globalThis.location);
return originalInit(...args).then((EmscriptenModule)=>{
if('undefined'!==typeof WorkerGlobalScope &&
- (EmscriptenModule['ENVIRONMENT_IS_PTHREAD']
- || EmscriptenModule['_pthread_self']
- || 'function'===typeof threadAlert
- || globalThis?.location?.pathname?.endsWith?.('.worker.js')
- )){
+ EmscriptenModule['ENVIRONMENT_IS_PTHREAD']){
/** Workaround for wasmfs-generated worker, which calls this
routine from each individual thread and requires that its
- argument be returned. All of the criteria above are fragile,
- based solely on inspection of the offending code, not public
- Emscripten details. */
+ argument be returned. The conditional criteria above are
+ fragile, based solely on inspection of the offending code,
+ not public Emscripten details. */
+ //console.warn("sqlite3InitModule() returning E-module.",EmscriptenModule);
return EmscriptenModule;
}
+ //console.warn("sqlite3InitModule() returning sqlite3 object.");
const s = EmscriptenModule.sqlite3;
s.scriptInfo = initModuleState;
//console.warn("sqlite3.scriptInfo =",s.scriptInfo);