diff options
author | bptato <nincsnevem662@gmail.com> | 2023-06-20 10:16:09 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-06-20 10:16:09 +0200 |
commit | 6a2d7aa639af60db59ca035a11e60e31c90f5284 (patch) | |
tree | a662c20957ff7c620223f939757f76f645c368c1 /src/js/javascript.nim | |
parent | bfd51fa9da7f0bf196651e64f8c22ffaeae0b606 (diff) | |
download | chawan-6a2d7aa639af60db59ca035a11e60e31c90f5284.tar.gz |
Do not GC_ref JS object opaques
So that the finalizer is actually triggered
Diffstat (limited to 'src/js/javascript.nim')
-rw-r--r-- | src/js/javascript.nim | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/js/javascript.nim b/src/js/javascript.nim index 737f2a20..38ba46bc 100644 --- a/src/js/javascript.nim +++ b/src/js/javascript.nim @@ -237,7 +237,6 @@ proc setOpaque*[T](ctx: JSContext, val: JSValue, opaque: T) = GC_ref(alt) rtOpaque.altplist[p] = cast[pointer](alt) JS_SetOpaque(val, cast[pointer](opaque)) - GC_ref(opaque) func isGlobal*(ctx: JSContext, class: string): bool = assert class != "" |