17 Jul
2023
17 Jul
'23
3:17 p.m.
BTW, what's the best way to track weak refs here? Let's say we have a rb_tree that maps an object to such tracking. We'd need a list of WeakMaps and possibly the entry values (associated with the key) for the "value" of the rb_tree. An array, like props, that doubles in size everytime it exceeds its max? Or something else?
It could probably be just a list of map entries. Eg. instead of `weakmap_entry`, you could have: ``` struct weak_reference { struct rb_entry map_entry; struct list key_entry; jsdisp_t *key; jsval_t value; int gc_mark; }; ``` It would be both part of mentioned list associated with jsdisp_t and WeakMap. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3300#note_39162