Closed Bug 420008 Opened 16 years ago Closed 16 years ago

"ASSERTION: Null content being pushed" with range.createContextualFragment

Categories

(Core :: DOM: HTML Parser, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: mrbkap)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase
###!!! ASSERTION: Null content being pushed!: 'aContent', file /Users/jruderman/trunk/mozilla/content/xml/document/src/nsXMLContentSink.cpp, line 891
This seems like a parser bug in nsParser::ParseFragment.  In this case the context is empty, so we're never calling WillBuildModel before we call WillBuildContent.  Hence the assertion.
Component: DOM: Traversal-Range → HTML: Parser
QA Contact: traversal-range → parser
Attached patch Possible fixSplinter Review
This is pretty hacky, I admit, but I think it's the easiest way to ensure that we call WillBuildModel.
Assignee: nobody → mrbkap
Status: NEW → ASSIGNED
Attachment #329483 - Flags: review?(bzbarsky)
Comment on attachment 329483 [details] [diff] [review]
Possible fix

Yeah, I guess this works.
Attachment #329483 - Flags: superreview+
Attachment #329483 - Flags: review?(bzbarsky)
Attachment #329483 - Flags: review+
Pushed as http://hg.mozilla.org/index.cgi/mozilla-central/rev/2a44521bb5f7
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: