Closed
Bug 797009
Opened 12 years ago
Closed 11 years ago
"Assertion failure: !fragment"
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
VERIFIED
FIXED
mozilla28
People
(Reporter: jruderman, Assigned: wchen)
References
Details
(Keywords: assertion, testcase)
Attachments
(3 files)
Assertion failure: !fragment, at ../../../parser/html/nsHtml5TreeBuilder.cpp:3462
Reporter | ||
Comment 1•12 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → wchen
Assignee | ||
Comment 2•11 years ago
|
||
It looks like this is just a bad assertion being hit in the "after head" insertion mode.
http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#the-after-head-insertion-mode
For some reason there is an assertion to check that the parser is not in the fragment case when pushing the head pointer onto the stack in the "after head" insertion mode. This is not mentioned in the spec and the attached test is an example of how this can happen.
Essentially, the test case reduces to parsing the fragment "<head></head><script></script>" in the context of <html>.
- The fragment parsing algorithm will reset the insertion mode to "before head".
- The <head></head> will put the parser in the "after head" insertion mode.
- <script> will push the head pointer on the stack. (This is where we hit the assertion)
This specified behavior makes sense to me so I think we should just get rid of the assertion unless there was a particular reason it's there, but everything seems to work fine in the case the assertion fails.
Attachment #829708 -
Flags: review?(hsivonen)
Comment on attachment 829708 [details] [diff] [review]
Remove bad assertion in HTML parser
The fragment assertions came from the spec in the past and the spec may have been in error or may have changed.
Attachment #829708 -
Flags: review?(hsivonen) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Flags: in-testsuite+
OS: Mac OS X → All
Hardware: x86_64 → All
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Comment 6•11 years ago
|
||
Reproduced in 2012-10-07-mozilla-central-debug.
Verified fixed 2013-11-27-mozilla-central-debug Win 7 x64.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•