From 36a0163e40eb7097e562dfc6d12af516847de2f3 Mon Sep 17 00:00:00 2001 From: stephan Date: Wed, 30 Nov 2022 07:17:29 +0000 Subject: Rename some OPFS JS files. Prevent JS bindings of sqlite3_uri_...() from performing JS-to-C-string argument conversion on their first argument, as doing so is specifically illegal. FossilOrigin-Name: 79832808de2cbdba140ed9e0558f1502b51d131ab4315265315922cda7b748cb --- ext/wasm/api/sqlite3-opfs-async-proxy.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ext/wasm/api/sqlite3-opfs-async-proxy.js') diff --git a/ext/wasm/api/sqlite3-opfs-async-proxy.js b/ext/wasm/api/sqlite3-opfs-async-proxy.js index da75f139c..8bf34cc78 100644 --- a/ext/wasm/api/sqlite3-opfs-async-proxy.js +++ b/ext/wasm/api/sqlite3-opfs-async-proxy.js @@ -592,13 +592,12 @@ const installAsyncProxy = function(self){ (opfsFlags & state.opfsFlags.OPFS_UNLOCK_ASAP) || state.opfsFlags.defaultUnlockAsap; if(0 /* this block is modelled after something wa-sqlite - does but it leads to immediate contention on journal files. */ + does but it leads to immediate contention on journal files. + Update: this approach reportedly only works for DELETE journal + mode. */ && (0===(flags & state.sq3Codes.SQLITE_OPEN_MAIN_DB))){ /* sqlite does not lock these files, so go ahead and grab an OPFS - lock. - - https://www.sqlite.org/uri.html - */ + lock. */ fh.xLock = "xOpen"/* Truthy value to keep entry from getting flagged as auto-locked. String value so that we can easily distinguish is later -- cgit v1.2.3