Skip to content

Optimize checks for DOMParentNode and DOMChildNode #11914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos 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.

@nielsdos nielsdos 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.
@nielsdos
Copy link
Member Author

nielsdos 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.

@nielsdos nielsdos 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