aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/extern-post-js.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-11-16 21:52:29 +0000
committerstephan <stephan@noemail.net>2022-11-16 21:52:29 +0000
commita872466c8ed936e2ad68a8a2ba717a7bda8689bf (patch)
tree58c9d017613952b297600bc1407f9607892ae5cf /ext/wasm/api/extern-post-js.js
parent1d4f1cf4266fb723673987fc1f3e27da78439d0c (diff)
downloadsqlite-a872466c8ed936e2ad68a8a2ba717a7bda8689bf.tar.gz
sqlite-a872466c8ed936e2ad68a8a2ba717a7bda8689bf.zip
Change a self.X JS reference to X to account for a symbol resolution discrepancy between vanilla JS and ES6 modules, as explained in [forum:801d8f77e5115141|forum post 801d8f77e5115141].
FossilOrigin-Name: 0590de4da1103d842b9f9f25bcd2e69223b2ea067ae2f320f58dd3763218b39d
Diffstat (limited to 'ext/wasm/api/extern-post-js.js')
-rw-r--r--ext/wasm/api/extern-post-js.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/wasm/api/extern-post-js.js b/ext/wasm/api/extern-post-js.js
index 84b99b53a..d933a3626 100644
--- a/ext/wasm/api/extern-post-js.js
+++ b/ext/wasm/api/extern-post-js.js
@@ -15,7 +15,10 @@
impls which Emscripten installs at some point in the file above
this.
*/
- const originalInit = self.sqlite3InitModule;
+ const originalInit =
+ /*Maintenance reminde: DO NOT use `self.` here. It's correct
+ for non-ES6 Module cases but wrong for ES6 modules because those
+ resolve this symbol differently! */ sqlite3InitModule;
if(!originalInit){
throw new Error("Expecting self.sqlite3InitModule to be defined by the Emscripten build.");
}