1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

JS SQLTestRunner can now run the Java impl's core-most sanity tests, missing only support for directives.

FossilOrigin-Name: 5e798369375ce1b0c9cdf831f835d931fbd562ff7b4db09a06d1bdca2ac1b975
This commit is contained in:
stephan
2023-08-29 20:01:01 +00:00
parent 69a55ca17d
commit aa15047796
7 changed files with 503 additions and 79 deletions

View File

@ -1139,15 +1139,15 @@ globalThis.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
/**
Records the current pstack position, calls the given function,
and restores the pstack regardless of whether the function
throws. Returns the result of the call or propagates an
exception on error.
passing it the sqlite3 object, then restores the pstack
regardless of whether the function throws. Returns the result
of the call or propagates an exception on error.
Added in 3.44.
*/
call: function(f){
const stackPos = wasm.pstack.pointer;
try{ return f() }finally{
try{ return f(sqlite3) } finally{
wasm.pstack.restore(stackPos);
}
}