Unref body when finished getting event handler
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
99809ee646
commit
e4f57437f6
|
@ -1343,10 +1343,14 @@ bool js_fire_event(jscontext *ctx, const char *type, struct dom_document *doc, s
|
|||
/* ... handlers bodynode */
|
||||
if (dukky_get_current_value_of_event_handler(
|
||||
CTX, corestring_dom_load, body) == false) {
|
||||
/* Unref the body, we don't need it any more */
|
||||
dom_node_unref(body);
|
||||
/* ... handlers */
|
||||
duk_pop(CTX);
|
||||
return true;
|
||||
}
|
||||
/* Unref the body, we don't need it any more */
|
||||
dom_node_unref(body);
|
||||
/* ... handlers handler bodynode */
|
||||
duk_pop(CTX);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue