Closed
Bug 841802
Opened 12 years ago
Closed 12 years ago
"Assertion failure: rv != nsresult::NS_ERROR_ILLEGAL_INPUT" with UTF-16 document and fragment identifier
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: jruderman, Assigned: emk)
References
Details
(Keywords: assertion, testcase)
Attachments
(3 files, 3 obsolete files)
(deleted),
text/plain
|
Details | |
(deleted),
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
hsivonen
:
review+
|
Details | Diff | Splinter Review |
Loading file:////.../layout/reftests/css-charset/test-charset-utf-16-be-bom.css#a
Assertion failure: rv != nsresult::NS_ERROR_ILLEGAL_INPUT, at content/base/src/nsContentUtils.cpp:3656
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #714590 -
Flags: review?(hsivonen)
Comment 3•12 years ago
|
||
Comment on attachment 714588 [details] [diff] [review]
Part 1: Clear error message when ErrorResult::ErrorCode() is called
This seems like very unexpected behavior to me....
And in particular, aren't we catching a real bug right now where the exception is being dropped on the floor?
Comment 4•12 years ago
|
||
And in particular, if part 1 is only needed to make part 2 work, then I think we should have an explicit way of dropping the non-nsresult parts of our state. If desired that way can even return the nsresult.
Assignee | ||
Comment 5•12 years ago
|
||
Forgot that mMessage might not be initialized.
https://tbpl.mozilla.org/?tree=Try&rev=c356d6973b53
Attachment #714588 -
Attachment is obsolete: true
Attachment #714588 -
Flags: review?(bzbarsky)
Attachment #714741 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 6•12 years ago
|
||
Comment on attachment 714741 [details] [diff] [review]
Part 1: Clear error message when ErrorResult::ErrorCode() is called
Oh, mid-aired.
Attachment #714741 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 7•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #4)
> And in particular, if part 1 is only needed to make part 2 work, then I
> think we should have an explicit way of dropping the non-nsresult parts of
> our state. If desired that way can even return the nsresult.
OK, made ClearMessage() explicit.
Attachment #714741 -
Attachment is obsolete: true
Attachment #714745 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 8•12 years ago
|
||
Using ClearMessage() explicitly.
Attachment #714590 -
Attachment is obsolete: true
Attachment #714590 -
Flags: review?(hsivonen)
Attachment #714746 -
Flags: review?(hsivonen)
Comment 9•12 years ago
|
||
Comment on attachment 714745 [details] [diff] [review]
Part 1: Add ErrorResult::ClearMessage()
r=me
Attachment #714745 -
Flags: review?(bzbarsky) → review+
Comment on attachment 714746 [details] [diff] [review]
Part 2: Use TextDecoderBase from nsContentUtils::ConvertStringFromCharset()
Sorry. I'm not up to speed on how the new bindings work. Why is it necessary to clear the message before the first return site but not before the second return site?
Assignee | ||
Comment 11•12 years ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #10)
> Comment on attachment 714746 [details] [diff] [review]
> Part 2: Use TextDecoderBase from nsContentUtils::ConvertStringFromCharset()
>
> Sorry. I'm not up to speed on how the new bindings work. Why is it necessary
> to clear the message before the first return site but not before the second
> return site?
Because only the first return site can throw TypeError. Basically TypeError should be thrown from generated codes as much as possible. TextDecoder's constructor is an exceptional case.
Comment on attachment 714746 [details] [diff] [review]
Part 2: Use TextDecoderBase from nsContentUtils::ConvertStringFromCharset()
r+ on the assumption that ClearMessage() usage makes sense.
Attachment #714746 -
Flags: review?(hsivonen) → review+
Assignee | ||
Comment 13•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a093423c5e5b
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b15e153f662
Comment #0 implies that our existing test case already covers this.
Flags: in-testsuite+
Comment 14•12 years ago
|
||
> Comment #0 implies that our existing test case already covers this.
That's not obvious to me, since the tree was green before this fix...
Assignee | ||
Comment 15•12 years ago
|
||
Maybe it's in bug 594645? (I have no access.)
Comment 16•12 years ago
|
||
That bug is a bug with a fuzzer.
As in, this bug was caught during fuzz-testing, using one of our reftests as the fuzzer input.
Which means we need a non-fuzzer test for this.
Reporter | ||
Comment 17•12 years ago
|
||
Comment 0 does not imply that our existing test suite covers this. Our existing test suite does not involve loading test-charset-utf-16-be-bom.css with a fragment identifier (or alone, at all).
Assignee | ||
Updated•12 years ago
|
Flags: in-testsuite+ → in-testsuite?
Comment 18•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a093423c5e5b
https://hg.mozilla.org/mozilla-central/rev/3b15e153f662
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•