diff options
| author | bptato <nincsnevem662@gmail.com> | 2025-02-05 19:40:30 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2025-02-05 19:40:30 +0100 |
| commit | 8a1b9a1685004b7a1ccf05bf49ff0e4d1fe4338e (patch) | |
| tree | f08884d263ed02707963a68c9736d3037aaa75fe /src/server/buffer.nim | |
| parent | b81f73006702b5a9495a76bf065ee0cf9a4b028b (diff) | |
| download | chawan-8a1b9a1685004b7a1ccf05bf49ff0e4d1fe4338e.tar.gz | |
javascript, jsopaque: call finalizers without corresponding JSValue
Previously, nim_finalize_for_js only called a finalizer if the opaque
Nim object already had a corresponding JSValue. This was probably an
oversight (at least I had no idea this worked this way), so now we
always call the finalizer.
The upshot is that this means that finalizers can now receive a nil
runtime in this case, so finalizers not prepared for this might break.
The solution is to either explicitly nil-check the runtime, or to ensure
that such objects always get converted to a JSValue first.
Diffstat (limited to 'src/server/buffer.nim')
0 files changed, 0 insertions, 0 deletions