diff options
author | bptato <nincsnevem662@gmail.com> | 2024-05-04 19:43:42 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-05-04 20:06:58 +0200 |
commit | 63442e5f8be17631a91cee352e441f59daa2df0a (patch) | |
tree | d546f8c0bf6884464ace32f2a083ce5098e064b1 /src/bindings | |
parent | 970378356d0d7239b332baa37470455391b5e6e4 (diff) | |
download | chawan-63442e5f8be17631a91cee352e441f59daa2df0a.tar.gz |
client: make quit() actually quit, misc fixes
* unwind the QJS stack with an uncatchable exception when quit is called * clean up JS references in JSRuntime free even when the Nim counterparts are still alive * simplify some tests
Diffstat (limited to 'src/bindings')
-rw-r--r-- | src/bindings/quickjs.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bindings/quickjs.nim b/src/bindings/quickjs.nim index 7a3eee54..06d8087f 100644 --- a/src/bindings/quickjs.nim +++ b/src/bindings/quickjs.nim @@ -526,6 +526,8 @@ proc JS_IsArray*(ctx: JSContext; v: JSValue): cint proc JS_Throw*(ctx: JSContext; obj: JSValue): JSValue proc JS_GetException*(ctx: JSContext): JSValue proc JS_IsError*(ctx: JSContext; v: JSValue): JS_BOOL +proc JS_SetUncatchableError*(ctx: JSContext; val: JSValue; flag: JS_BOOL) +proc JS_ResetUncatchableError*(ctx: JSContext) proc JS_NewError*(ctx: JSContext): JSValue proc JS_ThrowSyntaxError*(ctx: JSContext; fmt: cstring): JSValue {.varargs, discardable.} |