Closed Bug 1514091 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 14509 - TextDecoder: previous failure should not stick around

Categories

(Core :: Internationalization, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 14509 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/14509
Details from upstream follow.

Joshua Bell <jsbell@chromium.org> wrote:
>  TextDecoder: previous failure should not stick around
>  
>  When the {fatal:true} option is used, the decode() calls throw rather
>  than generating U+FFFD on bad data. Subsequent decode() calls should
>  work as the codec state should be flushed (unless {stream:true} was
>  specified).
>  
>  Blink was not flushing the codec state, so subsequent calls would
>  throw. Fix by flushing the codec state (instantiating a new codec),
>  and align the implementation's code flow/state more closely with the
>  spec. Also added a new WPT test case, based on the bug report.
>  
>  Bug: 910292
>  Change-Id: Ia47b902b69a4b469341e272ed42bb6b05248c1d8
>  Reviewed-on: https://chromium-review.googlesource.com/1376656
>  WPT-Export-Revision: 7f2bb5205941bb8a29b21d41f67c720a02f785c3
Component: web-platform-tests → Internationalization
Product: Testing → Core
Ran 2 tests and 72 subtests
OK     : 2
PASS   : 72
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8131e0336d28
[wpt PR 14509] - TextDecoder: previous failure should not stick around, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.