diff options
author | Andreu Botella <abb@randomunok.com> | 2022-01-05 00:42:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-05 00:42:30 +0100 |
commit | 22d140ffb194de38d842525907265e8a1ca51b04 (patch) | |
tree | b2ce2c982dcebb9a6c9ef4ef3746071d9c5e6a88 /cli/unix_util.rs | |
parent | 19c8cd3a457b58bc62a6e0223ff78208a73d9435 (diff) |
refactor(ext/web): Don't rely on NaN comparisons in `TextEncoderStream` (#13151)
In the `transform` function to `TextEncoderStream`'s internal
`TransformStream`, if `chunk` is the empty string and
`this.#pendingHighSurrogate` is null, then `lastCodeUnit` will be NaN.
As it turns out, this does not cause a bug because the comparison to
check for lone surrogates turns out to be false for NaN, but to rely on
it makes the code brittle.
Diffstat (limited to 'cli/unix_util.rs')
0 files changed, 0 insertions, 0 deletions