diff options
author | stephan <stephan@noemail.net> | 2022-10-21 06:58:27 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-10-21 06:58:27 +0000 |
commit | 98147dd5264fa362f458b2a154b6ee25f0c47963 (patch) | |
tree | 78151abe8c2c8a8a66397573b3ce8af6d0f15f19 /ext/wasm/api/sqlite3-api-oo1.js | |
parent | 848d27ada1d856cf8cfb677ba5cb8148d6516dc0 (diff) | |
download | sqlite-98147dd5264fa362f458b2a154b6ee25f0c47963.tar.gz sqlite-98147dd5264fa362f458b2a154b6ee25f0c47963.zip |
Add kvvfs tests to tester1.js. Fix a scopedAlloc() misuse in oo1.DB ctor caused by refactoring earlier this morning (and caught by these new tests).
FossilOrigin-Name: 8e0f001ab76de6dbc17295b9085f7f61ce274c43f8c432ea4d2ec3153d248ff3
Diffstat (limited to 'ext/wasm/api/sqlite3-api-oo1.js')
-rw-r--r-- | ext/wasm/api/sqlite3-api-oo1.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/wasm/api/sqlite3-api-oo1.js b/ext/wasm/api/sqlite3-api-oo1.js index b1b79c643..20210a03f 100644 --- a/ext/wasm/api/sqlite3-api-oo1.js +++ b/ext/wasm/api/sqlite3-api-oo1.js @@ -87,7 +87,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ being-construct DB object as its "this". See the DB constructor for the argument docs. This is split into a separate function in order to enable simple creation of special-case DB constructors, - e.g. JsStorageDB and OpfsDb. + e.g. JsStorageDb and OpfsDb. Expects to be passed a configuration object with the following properties: @@ -152,10 +152,7 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ const stack = wasm.pstack.pointer; try { const pPtr = wasm.pstack.allocPtr() /* output (sqlite3**) arg */; - const pVfsName = vfsName ? ( - ('number'===typeof vfsName ? vfsName : wasm.scopedAllocCString(vfsName)) - ): 0; - let rc = capi.sqlite3_open_v2(fn, pPtr, oflags, pVfsName); + let rc = capi.sqlite3_open_v2(fn, pPtr, oflags, vfsName || 0); pDb = wasm.getPtrValue(pPtr); checkSqlite3Rc(pDb, rc); if(flagsStr.indexOf('t')>=0){ |