summaryrefslogtreecommitdiff
path: root/core/ops_json.rs
diff options
context:
space:
mode:
authorAndreu Botella <abb@randomunok.com>2022-01-05 00:42:30 +0100
committerGitHub <noreply@github.com>2022-01-05 00:42:30 +0100
commit22d140ffb194de38d842525907265e8a1ca51b04 (patch)
treeb2ce2c982dcebb9a6c9ef4ef3746071d9c5e6a88 /core/ops_json.rs
parent19c8cd3a457b58bc62a6e0223ff78208a73d9435 (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 'core/ops_json.rs')
0 files changed, 0 insertions, 0 deletions