diff options
author | stephan <stephan@noemail.net> | 2022-10-20 04:00:05 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-10-20 04:00:05 +0000 |
commit | d89a66ec36491c1d98a1bbeb04dac4e74d66f754 (patch) | |
tree | 9a7128a89a35109046bd4a60def4d2f96e3831a4 /ext/wasm/api/sqlite3-api-prologue.js | |
parent | bf70f1bd1a24093e8a03549090af7d87ef4e9c8e (diff) | |
download | sqlite-d89a66ec36491c1d98a1bbeb04dac4e74d66f754.tar.gz sqlite-d89a66ec36491c1d98a1bbeb04dac4e74d66f754.zip |
Minor internal JS cleanups.
FossilOrigin-Name: 818ef0b5c909e733b643455278f7cc45533178f1cc6617058c00ed64fa44896a
Diffstat (limited to 'ext/wasm/api/sqlite3-api-prologue.js')
-rw-r--r-- | ext/wasm/api/sqlite3-api-prologue.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/wasm/api/sqlite3-api-prologue.js b/ext/wasm/api/sqlite3-api-prologue.js index 3980e0ad4..f59d86506 100644 --- a/ext/wasm/api/sqlite3-api-prologue.js +++ b/ext/wasm/api/sqlite3-api-prologue.js @@ -522,7 +522,7 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap( isInt32, isSQLableTypedArray, isTypedArray, typedArrayToString, isMainWindow: ()=>{ - return self.window===self && self.document; + return 'undefined' === typeof WorkerGlobalScope } }, @@ -904,8 +904,8 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap( */ wasm.pstack = Object.assign(Object.create(null),{ /** - Sets the current ppstack position to the given pointer. - Results are undefined if the passed-in value did not come from + Sets the current pstack position to the given pointer. Results + are undefined if the passed-in value did not come from this.pointer. */ restore: wasm.exports.sqlite3_wasm_pstack_restore, @@ -927,7 +927,7 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap( "bytes from the pstack."); }, /** - Allocates n chunks, each sz bytes, as a single memory block and + alloc()'s n chunks, each sz bytes, as a single memory block and returns the addresses as an array of n element, each holding the address of one chunk. @@ -965,7 +965,7 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap( will corrupt or read neighboring memory. However, when all pointers involved point to "small" data, it - is safe to pass a falsy value to save to memory. + is safe to pass a falsy value to save a tiny bit of memory. */ allocPtr: (n=1,safePtrSize=true)=>{ return 1===n |