Closed Bug 603423 Opened 10 years ago Closed 9 years ago

nsHtml5StreamParser::OnStartRequest shouldn't propagate errors from GetUnicodeDecoder

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: smontagu, Assigned: smontagu)

References

Details

Attachments

(2 files, 1 obsolete file)

This is exposed by my patch for bug 601429. If GetUnicodeDecoder fails, nsHtml5StreamParser::OnStartRequest passes the error code back to its caller. Later SetupDecodingAndWriteSniffingBufferAndCurrentSegment calls GetUnicoderDecoder again with a fallback charset, but because of the earlier failure the output buffers aren't set up, so Convert never gets called and the page ends up blank.
Attached patch Patch (obsolete) — Splinter Review
Assignee: nobody → smontagu
Attachment #482307 - Flags: review?(hsivonen)
Attached patch TestSplinter Review
Comment on attachment 482307 [details] [diff] [review]
Patch

r=hsivonen if you also on failure set mCharsetSource to kCharsetFromWeakDocTypeDefault (or whatever you deem to be appropriate as long as it's < kCharsetFromMetaPrescan).
Attachment #482307 - Flags: review?(hsivonen) → review+
Carrying over r=hsivonen. Now that bug 601429 is checked in, we ought to take this to fix the regression that it exposed.
Attachment #482307 - Attachment is obsolete: true
Attachment #488731 - Flags: review+
Attachment #488731 - Flags: approval2.0?
Attachment #488731 - Flags: approval2.0? → approval2.0+
http://hg.mozilla.org/mozilla-central/rev/174f235f76ed
http://hg.mozilla.org/mozilla-central/rev/2213446a018b
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.