Update encoding_rs to 0.8.0

RESOLVED FIXED in Firefox 62

Status

()

P3
normal
RESOLVED FIXED
10 months ago
9 months ago

People

(Reporter: hsivonen, Assigned: hsivonen)

Tracking

unspecified
mozilla62
Points:
---

Firefox Tracking Flags

(firefox62 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 months ago
The main reason to update is NEON capability that allows us to fix bug 1397807. (This bug isn't about enabling the NEON capability. Let's leave it to the other bug.)

Additionally, this version brings a huge performance boost to UTF-16LE and UTF-16BE decode, though that has little significance in practice.

As usual, rustfmt updates have messed up the reviewability of the diff. The repo history at https://github.com/hsivonen/encoding_rs may be more readable.
Comment hidden (mozreview-request)
(Assignee)

Comment 2

10 months ago
The cargo feature changes here are not meant to change anything in Firefox. The crate's default behavior changed to match Firefox, so the need for Firefox to pass a feature flag went away.
(Assignee)

Updated

10 months ago
Attachment #8983364 - Flags: review?(VYV03354)

Comment 3

10 months ago
mozreview-review
Comment on attachment 8983364 [details]
Bug 1466807 - Update encoding_rs to 0.8.0.

https://reviewboard.mozilla.org/r/249272/#review256438

::: third_party/rust/encoding_c/include/encoding_rs_cpp.h:953
(Diff revision 1)
>        decoder->max_utf8_buffer_length_without_replacement(bytes.size());
> -    if (needed == SIZE_MAX) {
> +    if (!needed) {
>        throw std::overflow_error("Overflow in buffer size computation.");
>      }
> -    std::string string(needed, '\0');
> -    uint32_t result;
> +    std::string string(needed.value(), '\0');
> +    const auto [result, read, written] =

Are structured bindings already available everywhere?

Updated

10 months ago
Priority: -- → P3
(Assignee)

Comment 4

9 months ago
(In reply to Masatoshi Kimura [:emk] from comment #3)
> Are structured bindings already available everywhere?

No, but that file is part of the materials the crate provides for non-Gecko users. The file is not used by Gecko. It just gets vendored under third_party with the whole package.

Comment 5

9 months ago
mozreview-review
Comment on attachment 8983364 [details]
Bug 1466807 - Update encoding_rs to 0.8.0.

https://reviewboard.mozilla.org/r/249272/#review256534

rs=me as long as this is a verbatim copy from upstream.
Attachment #8983364 - Flags: review?(VYV03354) → review+
(Assignee)

Comment 6

9 months ago
(In reply to Masatoshi Kimura [:emk] from comment #5)
> Comment on attachment 8983364 [details]
> Bug 1466807 - Update encoding_rs to 0.8.0.
> 
> https://reviewboard.mozilla.org/r/249272/#review256534
> 
> rs=me as long as this is a verbatim copy from upstream.

It is. Thank you.

Comment 7

9 months ago
Pushed by hsivonen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/466d43707902
Update encoding_rs to 0.8.0. r=emk

Comment 8

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/466d43707902
Status: ASSIGNED → RESOLVED
Last Resolved: 9 months ago
status-firefox62: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.