diff options
author | bptato <nincsnevem662@gmail.com> | 2024-06-03 20:28:29 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-06-03 20:28:29 +0200 |
commit | dfb03387691e72f8832734255765ddfdd38db372 (patch) | |
tree | 31f2c489859aa8bd7d7bc2b3b1854f11708b45f2 /adapter/tools/urldec.nim | |
parent | 34b0abd1a5811afa88b16442c0dc327881456d8f (diff) | |
download | chawan-dfb03387691e72f8832734255765ddfdd38db372.tar.gz |
js: fix runtime cleanup
This is a minefield. Intuitively, you would think that just clearing the opaque and manually freeing registered object should be enough. Unfortunately, this is not true; we do not store whether we are actually holding a reference to registered JS objects, so this approach leads to double frees. Instead, we add a QJS callback that is called right after the final GC cleanup, but before the list_free assertion. This way, we can be sure that any object still in our registry is referenced by us, and can therefore unreference them safely.
Diffstat (limited to 'adapter/tools/urldec.nim')
0 files changed, 0 insertions, 0 deletions