Skip to content

Commit 82221af

Browse files
committed
update for other pr decision
1 parent f55d47d commit 82221af

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

‎ext/dom/parentnode/tree.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ zend_result dom_parent_node_children_read(dom_object *obj, zval *retval)
3535
{
3636
zval *cached_children = dom_parent_node_children(obj);
3737
if (Z_ISUNDEF_P(cached_children)) {
38-
bool rc1 = GC_REFCOUNT(&obj->std) == 1;
3938
object_init_ex(cached_children, dom_html_collection_class_entry);
4039
php_dom_create_obj_map(obj, Z_DOMOBJ_P(cached_children), NULL, NULL, NULL, &php_dom_obj_map_child_elements);
4140

42-
/* Handle cycles for TMPVARs */
43-
/* TODO: depending on the solution for GH-18907, this may need changes */
44-
if (rc1) {
41+
/* Handle cycles for TMPVARs, RC == 2 because of 1 TMPVAR and 1 in HTMLCollection */
42+
if (GC_REFCOUNT(&obj->std) == 2) {
4543
gc_possible_root(Z_COUNTED_P(cached_children));
4644
}
4745
}

0 commit comments

Comments
 (0)