|
From: RBRi <rb...@us...> - 2019-04-10 17:37:14
|
Sorry no feedback since years, will close this. --- ** [bugs:#1688] Infinite Loop in DomNode.insertBefore** **Status:** open **Group:** Latest SVN **Created:** Fri May 22, 2015 08:04 PM UTC by William Walker **Last Updated:** Mon Oct 10, 2016 02:07 PM UTC **Owner:** nobody Have had HtmlUnit hang up on me executing some web pages. Below is an example url. https://www.tablespoon.com/profile/RailNewsletterCTA?parentUrl=%252frecipes%252fcookie-stuffed-brownie-cupcakes%252f3d4d01f7-72cc-434a-ac13-f2f19c3379aa%252f%253fnicam2%253dEmail%2526nichn2%253dCore%2526niseg2%253dTBSP%2526nicreatID2%253dTBSP_05_10_2015%2526utm_source%253dEmail_newsletter%2526utm_medium%253demail%2526utm_campaign%253dTBSP_05_10_2015&disablePageView=1 After tracing into code the problem occurs when insertBefore is called and (newChild instanceof DomDocumentFragment)==true AND fragment.getChildren is not empty. In my case, the insertBefore is occuring on the same node list that it is iterating against so the iteration goes on forever. DomNode.java ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 969: public Node insertBefore(final Node newChild, final Node refChild) { if (newChild instanceof DomDocumentFragment) { final DomDocumentFragment fragment = (DomDocumentFragment) newChild; for (final DomNode child : fragment.getChildren()) { insertBefore(child, refChild); } } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |