1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

[spidermoneky] dom_node_ref

There was error in element_finalize.
This commit is contained in:
Witold Filipczyk 2024-05-19 13:37:16 +02:00
parent cb8a1c5698
commit 888f06c74c

View File

@ -217,10 +217,13 @@ static void element_finalize(JS::GCContext *op, JSObject *obj)
mem_free(el_private);
JS::SetReservedSlot(obj, 1, JS::UndefinedValue());
dom_node_unref(el);
JS::SetReservedSlot(obj, 0, JS::UndefinedValue());
}
}
if (el) {
dom_node_unref(el);
JS::SetReservedSlot(obj, 0, JS::UndefinedValue());
}
}
static bool
@ -5247,6 +5250,8 @@ getElement(JSContext *ctx, void *node)
el_private->thisval = r_el;
map_privates[node] = el_private;
dom_node_ref((dom_node *)node);
return el;
}