Created attachment 725954 [details] testcase Assertion failure: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1))), at netwerk/base/src/nsUnicharStreamLoader.cpp:218 Same assertion as bug 843434, which Josh fixed last week.
mErrBehavior check is needed here, too. https://mxr.mozilla.org/mozilla-central/source/intl/uconv/ucvja/nsJapaneseToUnicode.cpp#506 And we should audit the all occurrence of |goto error2;|.
also this is happing on realworld sites see my bug 883083
:emk or josh, can you supply a patch here?
Created attachment 765062 [details] [diff] [review] Make ISO-2022-JP decoder reliable
Created attachment 765064 [details] [diff] [review] Regression test
Although the assertions are debug only, this change is web-visible because of TextDecoder. The test should catch all possible cases. I commented out |SimpleTest.expectAssertions(0, 2);| line because testharness doesn't define SimpleTest.
> I commented out |SimpleTest.expectAssertions(0, 2);| line because testharness > doesn't define SimpleTest. Which test harness does this test run in?
Was this bug present in Firefox 23 or earlier?
Probably Firefox 20 or later. This is a regression from bug 638379.