Skip to content

Commit 91665ea

Browse files
committed
Backport Lexbor changes to 8.4
1 parent 19ffe57 commit 91665ea

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

ext/dom/lexbor/lexbor/core/in.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ lexbor_in_node_make(lexbor_in_t *incoming, lexbor_in_node_t *last_node,
6565

6666
node->opt = LEXBOR_IN_OPT_UNDEF;
6767
node->begin = buf;
68-
node->end = buf + buf_size;
68+
node->end = buf ? (buf + buf_size) : NULL;
6969
node->use = buf;
7070

7171
if (last_node != NULL) {

ext/dom/lexbor/lexbor/core/str.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ lexbor_str_append(lexbor_str_t *str, lexbor_mraw_t *mraw,
133133
{
134134
lxb_char_t *data_begin;
135135

136+
if (length == 0) {
137+
return str->data;
138+
}
139+
136140
lexbor_str_check_size_arg_m(str, lexbor_str_size(str),
137141
mraw, (length + 1), NULL);
138142

ext/dom/lexbor/lexbor/dom/interfaces/node.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,6 @@ lxb_dom_node_t *
248248
lxb_dom_node_destroy(lxb_dom_node_t *node)
249249
{
250250
lxb_dom_node_remove(node);
251-
252-
if (node->owner_document->ev_destroy != NULL) {
253-
node->owner_document->ev_destroy(node);
254-
}
255-
256251
return lxb_dom_document_destroy_interface(node);
257252
}
258253

0 commit comments

Comments
 (0)