This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Section: http://www.whatwg.org/specs/web-apps/current-work/#scriptForeignEndTag Comment: EOF handling in foreign content needs to change the insertion mode Posted from: 67.169.69.72
"in foreign content": An end-of-file token Parse error. Pop elements from the stack of open elements until either a math element or an svg element has been popped from the stack, and reprocess the token. I believe that will recurse infinitely, since it never changes the insertion mode. So it's just gonna end up attempting to pop forever. (In WebKit it would eventually hit an ASSERT since our open elements data structure will ASSERT when it runs out of things to pop.)
This is what I've done for now: case InForeignContentMode: parseError(token); // FIXME: This would infinite loop otherwise, for now, violate the spec. // http://www.w3.org/Bugs/Public/show_bug.cgi?id=10115 HTMLElementStack::ElementRecord* record = m_tree.openElements()->topRecord(); for (; record; record = record->next()) if (record->element()->namespaceURI() == xhtmlNamespaceURI) break; m_tree->openElements()->pop(); } processEndOfFile(token); break;
See also bug 9831.
*** This bug has been marked as a duplicate of bug 9831 ***