1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

10 commits

Author SHA1 Message Date
Bartek Iwańczuk
8176a4d166
refactor: primordials for instanceof (#13527) 2022-02-01 18:06:11 +01:00
Bartek Iwańczuk
f248e6f177
Revert "refactor: update runtime code for primordial checks for "instanceof" (#13497)" (#13511)
This reverts commit 884143218f.
2022-01-27 16:27:22 +01:00
Bartek Iwańczuk
884143218f
refactor: update runtime code for primordial checks for "instanceof" (#13497) 2022-01-27 13:36:36 +01:00
Ryan Dahl
1fb5858009
chore: update copyright to 2022 (#13306)
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2022-01-07 22:09:52 -05:00
Andreu Botella
22d140ffb1
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.
2022-01-05 00:42:30 +01:00
Andreu Botella
74a93fdf63
fix(webidl): Don't throw when converting a detached buffer source (#12585)
The Web IDL conversion to `BufferSource` and similar types shouldn't
check whether the buffer is detached.

In the case of `TextDecoder`, our implementation would still throw after
the Web IDL conversions because we're creating a new `Uint8Array` from
the buffer source's buffer, which throws if it's detached. This change
also fixes this bug.
2021-10-28 23:17:27 +02:00
Andreu Botella
507ab50e0f
perf(encoding): avoid copying the input data in TextDecoder (#12573)
The implementation of `TextDecoder` had a bug where it was copying the
input data in every case. This change removes that copy in
non-`SharedArrayBuffer` cases.

Since passing a shared buffer source to Rust would fail, this copy of
the input data was making `TextDecoder` work in cases where the input
is shared. In order to avoid a breaking change, the copy is retained in
those cases.
2021-10-29 07:32:58 +11:00
李瑞丰
46245b830a
fix(ext/webidl): correctly apply [SymbolToStringTag] to interfaces (#11851)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2021-09-25 02:07:22 +09:00
David Sherret
987716798f
feat(fmt): add basic JS doc formatting (#11902) 2021-09-02 18:28:12 -04:00
Ryan Dahl
a0285e2eb8
Rename extensions/ directory to ext/ (#11643) 2021-08-11 12:27:05 +02:00
Renamed from extensions/web/08_text_encoding.js (Browse further)