mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[quickjs] unref attrs in finalizer
This commit is contained in:
parent
f91d9b3d06
commit
8797227b19
@ -278,10 +278,14 @@ static const JSCFunctionListEntry js_attributes_proto_funcs[] = {
|
||||
static void
|
||||
js_attributes_finalizer(JSRuntime *rt, JSValue val)
|
||||
{
|
||||
void *node = js_attributes_GetOpaque(val);
|
||||
void *attrs = js_attributes_GetOpaque(val);
|
||||
|
||||
js_attributes_SetOpaque(val, NULL);
|
||||
attr_erase_from_map_str(map_attributes, node);
|
||||
attr_erase_from_map_str(map_attributes, attrs);
|
||||
|
||||
if (attrs) {
|
||||
dom_namednodemap_unref(attrs);
|
||||
}
|
||||
}
|
||||
|
||||
static JSClassDef js_attributes_class = {
|
||||
|
Loading…
Reference in New Issue
Block a user