diff options
author | stephan <stephan@noemail.net> | 2022-12-25 14:04:06 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-12-25 14:04:06 +0000 |
commit | 7015aa9f4957c3131c8bc814c81c4c5d2dea8f89 (patch) | |
tree | 45f0703be21222001bd129f5ba98100c1e860782 /ext/wasm/common/whwasmutil.js | |
parent | 485229e14774ef12d31a815b05aee047739086dd (diff) | |
download | sqlite-7015aa9f4957c3131c8bc814c81c4c5d2dea8f89.tar.gz sqlite-7015aa9f4957c3131c8bc814c81c4c5d2dea8f89.zip |
Add missing sqlite3_context_db_handle() JS binding. Reimplement sqlite3_set_authorizer() and sqlite3_set_auxdata() JS bindings to take advantage of [7f9ace1b11a67]. Teach FuncPtrAdapter to emit a console.warn() message if it is invoked after the library is bootstrapped, the goal being to inform users that it's an internal API and should not be invoked from client-side code.
FossilOrigin-Name: 8e3d4f6294037396e388ec21abb18bf0201a6bec6ff004730cc5d11b705a6d2b
Diffstat (limited to 'ext/wasm/common/whwasmutil.js')
-rw-r--r-- | ext/wasm/common/whwasmutil.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/wasm/common/whwasmutil.js b/ext/wasm/common/whwasmutil.js index 26c44cf1a..8e1858612 100644 --- a/ext/wasm/common/whwasmutil.js +++ b/ext/wasm/common/whwasmutil.js @@ -1598,6 +1598,11 @@ self.WhWasmUtilInstaller = function(target){ xArg.FuncPtrAdapter = class FuncPtrAdapter extends AbstractArgAdapter { constructor(opt) { super(opt); + if(xArg.FuncPtrAdapter.warnOnUse){ + console.warn('xArg.FuncPtrAdapter is an internal-only API', + 'and is not intended to be invoked from', + 'client-level code. Invoked with:',opt); + } this.signature = opt.signature; if(!opt.bindScope && (opt.contextKey instanceof Function)){ opt.bindScope = 'context'; @@ -1616,6 +1621,8 @@ self.WhWasmUtilInstaller = function(target){ ? opt.callProxy : undefined; } + static warnOnUse = false; + static bindScopes = [ 'transient', 'context', 'singleton' ]; |