diff options
author | stephan <stephan@noemail.net> | 2022-11-30 07:17:29 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-11-30 07:17:29 +0000 |
commit | 36a0163e40eb7097e562dfc6d12af516847de2f3 (patch) | |
tree | a1d07f4ea54db6f1e8405cedd0309cbb6ca81735 /ext/wasm/api/sqlite3-opfs-async-proxy.js | |
parent | ad4f7828153e6b80c0fceabb1a9ece702172b836 (diff) | |
download | sqlite-36a0163e40eb7097e562dfc6d12af516847de2f3.tar.gz sqlite-36a0163e40eb7097e562dfc6d12af516847de2f3.zip |
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
Diffstat (limited to 'ext/wasm/api/sqlite3-opfs-async-proxy.js')
-rw-r--r-- | ext/wasm/api/sqlite3-opfs-async-proxy.js | 9 |
1 files changed, 4 insertions, 5 deletions
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 |