diff options
author | stephan <stephan@noemail.net> | 2022-12-08 09:06:20 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-12-08 09:06:20 +0000 |
commit | d061f144660ea40ea5269959a6fd07b25575c21d (patch) | |
tree | 8280165b4271ba227813ac5e78478d1cc5c57f59 /ext/wasm/api | |
parent | ab8b22a03d033adaa61f82e5c080de64c8200549 (diff) | |
download | sqlite-d061f144660ea40ea5269959a6fd07b25575c21d.tar.gz sqlite-d061f144660ea40ea5269959a6fd07b25575c21d.zip |
Got JS non-eponymous vtable working thanks to a hint from Dan.
FossilOrigin-Name: 750719b4981df62fa2ff3665e6f559ec760609ad2493495628295ad9ae6024fc
Diffstat (limited to 'ext/wasm/api')
-rw-r--r-- | ext/wasm/api/sqlite3-api-oo1.js | 10 | ||||
-rw-r--r-- | ext/wasm/api/sqlite3-v-helper.js | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/ext/wasm/api/sqlite3-api-oo1.js b/ext/wasm/api/sqlite3-api-oo1.js index 4ec61af07..caae43275 100644 --- a/ext/wasm/api/sqlite3-api-oo1.js +++ b/ext/wasm/api/sqlite3-api-oo1.js @@ -520,10 +520,12 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ db is closed but before auxiliary state like this.filename is cleared. - Both onclose handlers are passed this object. If this db is not - opened, neither of the handlers are called. Any exceptions the - handlers throw are ignored because "destructors must not - throw." + Both onclose handlers are passed this object, with the onclose + object as their "this," noting that the db will have been + closed when onclose.after is called. If this db is not opened + when close() is called, neither of the handlers are called. Any + exceptions the handlers throw are ignored because "destructors + must not throw." Note that garbage collection of a db handle, if it happens at all, will never trigger close(), so onclose handlers are not a diff --git a/ext/wasm/api/sqlite3-v-helper.js b/ext/wasm/api/sqlite3-v-helper.js index 88c86a6a0..264c606b4 100644 --- a/ext/wasm/api/sqlite3-v-helper.js +++ b/ext/wasm/api/sqlite3-v-helper.js @@ -339,8 +339,10 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){ (sqlite3_vtab*) instance and returns the capi.sqlite3_vtab object created by the first form of this function, or undefined if that form has not been used. This is intended to be called - from sqlite3_module methods which take a (sqlite3_vtab*) pointer - _except_ for xDisconnect(), in which case use... + from sqlite3_module methods which take a (sqlite3_vtab*) + pointer _except_ for xDestroy() (if there is a distinct + xCreate()) or xDisconnect() (if xCreate() is 0 or is the same + as xConnect()), in which case use... - wrapVtab(pVtab,true) as for the previous form, but removes the pointer-to-object mapping before returning. The caller must |