This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10115 - EOF handling in foreign content needs to change the insertion mode
Summary: EOF handling in foreign content needs to change the insertion mode
Status: VERIFIED DUPLICATE of bug 9831
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P1 critical
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-08 22:23 UTC by contributor
Modified: 2010-10-22 10:38 UTC (History)
7 users (show)

See Also:


Attachments

Description contributor 2010-07-08 22:23:30 UTC
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
Comment 1 Eric Seidel 2010-07-08 22:25:04 UTC
"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.)
Comment 2 Eric Seidel 2010-07-08 22:29:52 UTC
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;
Comment 3 Henri Sivonen 2010-07-09 05:52:01 UTC
See also bug 9831.
Comment 4 Eric Seidel 2010-07-09 06:40:48 UTC

*** This bug has been marked as a duplicate of bug 9831 ***