1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Rework the Emscripten-emitted module loader/init function such that it passes on the sqlite3 module, instead of the Emscripten module, to the first then() of sqlite3InitModule()'s returned Promise. This eliminates any need to mention the Emscripten module object in client-side code unless they want to configure it in advance for loading-status reports.

FossilOrigin-Name: 0dbaa0e2b5abf5c23e2039ec90a3055ebb3c063aaf4e556c42546defe6fbb86d
This commit is contained in:
stephan
2022-09-29 13:17:50 +00:00
parent 4b884bb4c7
commit b94a98607a
17 changed files with 127 additions and 100 deletions

View File

@ -34,11 +34,8 @@
});
};
const runTests = function(Module){
//stdout("Module",Module);
self._MODULE = Module /* this is only to facilitate testing from the console */;
const sqlite3 = Module.sqlite3,
capi = sqlite3.capi,
const runTests = function(sqlite3){
const capi = sqlite3.capi,
oo = sqlite3.oo1,
wasm = capi.wasm;
stdout("Loaded sqlite3:",capi.sqlite3_libversion(), capi.sqlite3_sourceid());
@ -60,7 +57,7 @@
].forEach((f)=>{
const n = performance.now();
stdout(banner1,"Running",f.name+"()...");
f(db, sqlite3, Module);
f(db, sqlite3);
stdout(banner2,f.name+"() took ",(performance.now() - n),"ms");
});
}finally{