Граф коммитов

49 Коммитов

Автор SHA1 Сообщение Дата
Edgar Chen 9e846bd48a bug 1610296 - Rename TypedArray_base::ComputeLengthAndData to TypedArray_base::ComputeState; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60514

--HG--
extra : moz-landing-system : lando
2020-01-23 03:22:06 +00:00
Emilio Cobos Álvarez 4d059556c2 Bug 1607406 - Add TypedArray::Create(Span<T>) and remove an ugly cast in TextEncoder. r=bzbarsky
The bounds check becomes needed now, though it should hopefully be optimized
away too as all the involved calls that you need to know about to determine that
it can't happen are inline.

Differential Revision: https://phabricator.services.mozilla.com/D58909

--HG--
extra : moz-landing-system : lando
2020-01-07 15:42:19 +00:00
Emilio Cobos Álvarez e12a18dac8 Bug 1607083 - Remove JSString usage from TextEncoder.encode. r=bzbarsky
UTF8String has small-size optimization already, and does what we were doing
taking less memory when the string is latin1, so it should be a clear
improvement unless I'm missing something.

I didn't remove it from encodeInto because it'd do more work in the case where
the UInt8Array doesn't have enough capacity... Not sure if that case is worth
optimizing or not, honestly.

Differential Revision: https://phabricator.services.mozilla.com/D58713

--HG--
extra : moz-landing-system : lando
2020-01-07 08:46:31 +00:00
Boris Zbarsky 222487304c Bug 1580014. Don't force methods into the "can throw any exception" bucket just because they always return a new JS object. r=peterv
Instead, mark them as "can OOM", since we have that concept now.

Differential Revision: https://phabricator.services.mozilla.com/D45251

--HG--
extra : moz-landing-system : lando
2019-09-24 08:51:47 +00:00
Henri Sivonen 75e563c076 Bug 1561573 - Avoid linearization and inflation to UTF-16 of the string input to TextEncoder. r=jandem,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D44121

--HG--
extra : moz-landing-system : lando
2019-09-18 08:26:52 +00:00
Henri Sivonen c193518677 Bug 1490601 part 2 - Move C++ entry points to encoding_c_mem to mfbt/. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D43957

--HG--
extra : moz-landing-system : lando
2019-09-18 08:26:34 +00:00
Boris Zbarsky 1128b8dee8 Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D45394

--HG--
extra : moz-landing-system : lando
2019-09-12 11:01:17 +00:00
Henri Sivonen 2daf725240 Bug 1514664 - Implement TextEncoder.encodeInto(). r=emk. 2019-01-11 12:35:17 +02:00
Henri Sivonen b10e89785b Bug 1515351 - Update encoding_rs to 0.8.14. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D15934

--HG--
extra : moz-landing-system : lando
2019-01-10 09:42:39 +00:00
Henri Sivonen c3a839f3e2 Bug 1514726 - Avoid an allocation and copy in TextEncoder.encode() in the non-ASCII case. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D14728

--HG--
extra : moz-landing-system : lando
2018-12-18 11:40:31 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Boris Zbarsky 4c0adfa061 Bug 1481927. Always pass an object from the "relevant global" to Web IDL APIs that have a non-wrapper-cached "this". r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D4491

--HG--
extra : moz-landing-system : lando
2018-08-29 03:03:46 +00:00
Jan de Mooij 80adc67aba Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Jan de Mooij 80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Henri Sivonen 432653453a Bug 1261841 part 2 - Use encoding_rs instead of uconv. r=emk,mystor.
MozReview-Commit-ID: 15Y5GTX98bv
2017-06-13 13:23:23 +03:00
Michael Layzell befc7b0924 Bug 1331434 - Part 9: Return after ErrorResult::Throw in /dom, r=ehsan
MozReview-Commit-ID: CWjx4L8LTr9
2017-03-07 19:06:48 -05:00
Masatoshi Kimura 160a5b6fb7 Bug 1257877 - Remove UTF-16 support from TextEncoder. r=hsivonen 2016-03-24 19:27:15 +09:00
Nathan Froyd ddc23df5df Bug 1222475 - use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in dom/; r=baku,bz,terrence 2015-11-03 13:29:19 -05:00
Boris Zbarsky df75080cc3 Bug 1226479. Change ErrorResult::ThrowTypeError/ThrowRangeError to take string references, not pointers. r=mccr8 2015-11-20 13:36:46 -05:00
Henri Sivonen 85ba0b6e2f Bug 1211454 - Avoid requesting a zero-terminated string in TextEncoder when zero-termination is not needed. r=emk. 2015-10-14 15:28:50 +03:00
Andrew McCreight 5171450b27 Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-05 09:38:14 -07:00
Wes Kocher f0d829220d Backed out changeset 821791826960 (bug 1197893) for Nexus build failures CLOSED TREE 2015-10-02 16:17:05 -07:00
Andrew McCreight 35cd15b8de Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-02 15:09:02 -07:00
Andrew McCreight 7a2c6267d4 Backed out changeset 6fa9cdf4002b for breaking the build. 2015-10-02 10:49:28 -07:00
Andrew McCreight 404740a102 Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-02 10:42:08 -07:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Dhi Aurrahman 5b8f79fc23 Bug 1125766 - Throw proper error types for TextEncoder(), TextDecoder() and TextDecoder.decode(). r=bz 2015-02-04 18:46:26 +07:00
Mike Hommey a35dbaeebf Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn
--HG--
rename : memory/mozalloc/fallible.h => memory/fallible/fallible.h
2015-02-02 09:56:13 +09:00
Boris Zbarsky 76e076eb08 Bug 1092737 part 1. Update TextEncoder to various spec changes. r=emk 2014-11-21 14:58:45 -05:00
Boris Zbarsky dfe8c38082 Bug 1009675 part 3. Return WebIDL 'object' values as handles. r=peterv 2014-06-11 16:26:52 -04:00
Boris Zbarsky 5a6f899f61 Bug 993889 part 5. Remove the "creator" argument of the version of TypedArray::Create that takes a JSObject* creator. r=bholley 2014-04-10 00:58:42 -04:00
Ehsan Akhgari 1b83407ce9 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Henri Sivonen 7b95f9e668 Bug 919935 - Add a deCOMtaminated way to instantiate nsIUnicodeDecoders and nsIUnicodeEncoders. r=emk. 2013-11-26 09:31:52 +02:00
Kyle Huey 2857dd13fa Bug 903772: Followup to address missed review comment. 2013-08-23 10:29:57 -07:00
Kyle Huey 4c7a770de0 Bug 903772: Part 8 - Remove TextEncoderBase. r=emk 2013-08-22 22:17:10 -07:00
Kyle Huey 5973672ab9 Bug 903772: Part 7 - Remove the worker thread TextEncoder implementation. r=emk 2013-08-22 22:17:10 -07:00
Kyle Huey 0428823e52 Bug 903772: Part 1 - Add an API for creating typed arrays that doesn't require the caller to be wrapper cached. r=peterv 2013-08-22 22:17:07 -07:00
Masatoshi Kimura e5f58138b5 Bug 841479 - Remove nsISupports inheritance from TextDecoder and TextEncoder. r=bz 2013-02-15 05:36:50 +09:00
Masatoshi Kimura e9c46e4563 Bug 795542 - Part 1: Create Text(En|De)coderBase. r=bent
--HG--
rename : dom/encoding/TextDecoder.h => dom/encoding/TextDecoderBase.h
rename : dom/encoding/TextEncoder.h => dom/encoding/TextEncoderBase.h
2012-12-22 09:15:43 +09:00
William Chen c3b4bdb077 Bug 820544 - Prefix WebIDL dictionary native member names to avoid C++ keywords. r=bz 2012-12-17 13:44:04 -08:00
Masatoshi Kimura ed8d21619c Bug 820373 - Add a null check to TextEncoder.encode(). r=bz 2012-12-16 19:51:11 -05:00
Ed Morley fbf6fab8e8 Backout 67d84be0cc83 (bug 820544) for bustage 2012-12-14 16:58:51 +00:00
William Chen 45b4ea581a Bug 820544 - Prefix webidl dictionary native members names to avoid C++ keywords. r=bz 2012-12-11 16:05:46 -08:00
Masatoshi Kimura f65df800e1 Bug 811127 - Text(De|En)coder("utf-16").encoding should return "utf-16le", not "utf-16". r=hsivonen 2012-11-14 21:01:07 -05:00
Masatoshi Kimura 61bb610373 Bug 801402 - Make EncodingUtil methods case sensitive. r=hsivonen 2012-11-07 18:04:22 -05:00
Masatoshi Kimura 3515bb4825 Bug 801487 - Change some exceptions from EncodingError to TypeError. r=sicking 2012-11-06 18:23:14 -05:00
Masatoshi Kimura 867145ce8f Bug 801487 - Update WebIDL definitions. r=sicking 2012-10-24 22:03:21 -04:00
Masatoshi Kimura 13e54c9451 Bug 764234 - Implement StringEncoding API. r=dougt,smontagu 2012-09-28 11:19:18 +01:00