aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/pre-js.c-pp.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-01-27 07:53:49 +0000
committerstephan <stephan@noemail.net>2023-01-27 07:53:49 +0000
commit9dc093d095646688dfa35ea19497fc8429793e3b (patch)
treef123e84a2549821d42e70ec779f0658751ef0943 /ext/wasm/api/pre-js.c-pp.js
parentca86a5351e39bbdba0ec38ed06d28a1a2dca504f (diff)
downloadsqlite-9dc093d095646688dfa35ea19497fc8429793e3b.tar.gz
sqlite-9dc093d095646688dfa35ea19497fc8429793e3b.zip
Work around a JS null pointer deref which could be triggered from the dev console, but not (it seems) from client-side code.
FossilOrigin-Name: eabb551b8b3d33fc3a327ecf7225436a3a3f616901e22c868fd76a5e3adc7b3f
Diffstat (limited to 'ext/wasm/api/pre-js.c-pp.js')
-rw-r--r--ext/wasm/api/pre-js.c-pp.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/wasm/api/pre-js.c-pp.js b/ext/wasm/api/pre-js.c-pp.js
index 2e2fe66bc..5d8e58864 100644
--- a/ext/wasm/api/pre-js.c-pp.js
+++ b/ext/wasm/api/pre-js.c-pp.js
@@ -6,7 +6,9 @@
*/
// See notes in extern-post-js.js
-const sqlite3InitModuleState = self.sqlite3InitModuleState || Object.create(null);
+const sqlite3InitModuleState = self.sqlite3InitModuleState || Object.assign(Object.create(null),{
+ debugModule: ()=>{}
+});
delete self.sqlite3InitModuleState;
sqlite3InitModuleState.debugModule('self.location =',self.location);