Skip to content

Conversation

@ndossche
Copy link
Member

@ndossche ndossche commented Aug 8, 2023

If we check the list with dom_sanity_check_node_list_for_insertion() before dom_is_node_in_list(), then we don't have to check the object type anymore in dom_is_node_in_list(), because
dom_sanity_check_node_list_for_insertion() will have already done that.

@ndossche ndossche changed the title Optimize checks in for DOMParentNode Optimize checks for DOMParentNode and DOMChildNode Aug 8, 2023
If we check the list with dom_sanity_check_node_list_for_insertion()
before dom_is_node_in_list(), then we don't have to check the object
type anymore in dom_is_node_in_list(), because
dom_sanity_check_node_list_for_insertion() will have already done that.
@ndossche
Copy link
Member Author

ndossche commented Aug 8, 2023

The reordering of the calls is the same as in #11905, but I didn't want to make the optimization in that PR as it's unrelated.

@ndossche ndossche closed this in 620b622 Aug 9, 2023
ju1ius pushed a commit to ju1ius/php-src that referenced this pull request Aug 15, 2023
Because we check the list with dom_sanity_check_node_list_for_insertion()
before dom_is_node_in_list(), then we don't have to check the object
type anymore in dom_is_node_in_list(), because
dom_sanity_check_node_list_for_insertion() will have already done that.

Closes phpGH-11914.
jorgsowa pushed a commit to jorgsowa/php-src that referenced this pull request Aug 16, 2023
Because we check the list with dom_sanity_check_node_list_for_insertion()
before dom_is_node_in_list(), then we don't have to check the object
type anymore in dom_is_node_in_list(), because
dom_sanity_check_node_list_for_insertion() will have already done that.

Closes phpGH-11914.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants