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

1441 Коммитов

Автор SHA1 Сообщение Дата
Andrew McCreight 4babb2b5ab Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 17:39:15 +00:00
Ciure Andrei 00dd87f6f4 Backed out changeset d407a28318e6 (bug 1609815) for causing windows ming bustages CLOSED TREE
--HG--
extra : histedit_source : b2c748e31e0f6ba8fcf9960a336e0bbd361b07e6
2020-02-27 07:05:19 +02:00
Andrew McCreight b197e1f783 Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 04:43:48 +00:00
Masatoshi Kimura a37fc61f17 Bug 1617415 - Remove nsTSubstring<T>::ReplaceASCII. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63775

--HG--
extra : moz-landing-system : lando
2020-02-23 01:01:33 +00:00
Kershaw Chang 26da4db75f Bug 1603504 - Use release_acquire in nsStringBuffer::IsReadonly for TSan build r=froydnj
TSan reports a benign race when accessing a string between main thread and IPDL background thread. The reason is that we use `memory_order_relaxed` to check the reference count of StringBuffer. To avoid the benign race, this patch uses `memory_order_acquire` to perform acquire memory synchronization only for TSan build.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 14:06:43 +00:00
Simon Giesecke 30984f7bab Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62543

--HG--
extra : moz-landing-system : lando
2020-02-12 11:13:33 +00:00
Michael Forney 02f3747734 Bug 1611536 - Add stdint.h include for fixed-width integer types r=Ehsan
musl libc does not define these types through the other headers
included by this file, which causes errors when building RemoteUtils.cpp
(which indirectly includes nsCharTraits.h):

	error: unknown type name 'int32_t'

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

--HG--
extra : moz-landing-system : lando
2020-01-25 00:40:51 +00:00
Andi-Bogdan Postelnicu 597ca4ed51 Bug 1605659 - fix some errors discovered with `-Wdeprecated-copy`. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D59296

--HG--
extra : moz-landing-system : lando
2020-01-09 16:42:15 +00:00
Emilio Cobos Álvarez 278b36aafb Bug 1607816 - Replace mozilla::{Max, Min}Value with std::numeric_limits. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D59153

--HG--
extra : moz-landing-system : lando
2020-01-08 16:30:40 +00:00
Emilio Cobos Álvarez 400567dcde Bug 1606958 - Use FakeString for UTF8String. r=bzbarsky,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D58683

--HG--
extra : moz-landing-system : lando
2020-01-07 21:37:12 +00:00
Emilio Cobos Álvarez c098b80e6c Bug 1607547 - nsTAutoString::mInlineCapacity should be const. r=froydnj
It shouldn't ever change.

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

--HG--
extra : moz-landing-system : lando
2020-01-07 20:10:17 +00:00
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Simon Giesecke fec8c64d2a Bug 1602452 - Make member functions of nsTStringRepr defined in header constexpr. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D56369

--HG--
extra : moz-landing-system : lando
2019-12-10 08:40:48 +00:00
Mihai Alexandru Michis f995448544 Backed out changeset bf906a905a26 (bug 1602452) for causing bustages in gtest/TestStrings.cpp
CLOSED TREE
2019-12-09 17:41:25 +02:00
Simon Giesecke 50cf008dd3 Bug 1602452 - Make member functions of nsTStringRepr defined in header constexpr. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D56369

--HG--
extra : moz-landing-system : lando
2019-12-09 15:01:22 +00:00
Paul Bone 93489fe04d Bug 1596198 - Remove the canary from nsStringBuffer r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D52961

--HG--
extra : moz-landing-system : lando
2019-11-14 22:50:31 +00:00
Mirko Brodesser 9997183bdd Bug 1591417: part 3) Add `nsTStringRepr<T>::EqualsLatin1`. r=froydnj
Needed to compare with `nsTextFragment::Get1b()` which returns latin1-encoded
characters. Used in a subsequent review.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 15:20:25 +00:00
Emilio Cobos Álvarez fe10c35ad2 Bug 1591191 - Move compare and EqualsIgnoreAsciiCase to nsTStringRepr. r=erahm
Zibi is working on replacing some string based APIs with some things that return
substrings, so we could use this.

Alternatively he'd have to do something like:

  Compare(myCSubstring, nsDependentCSubstring(aTag, strlen(aTag)))

or something of that sort, which looks a bit uglier.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 11:27:05 +00:00
Dorel Luca d8264bf6a7 Backed out changeset eb3d67637a9b (bug 1591191) for build bustage on build/src/xpcom/string/precompiled_templates.cpp. CLOSED TREE 2019-11-04 12:40:57 +02:00
Emilio Cobos Álvarez 7d302de427 Bug 1591191 - Move compare and EqualsIgnoreAsciiCase to nsTStringRepr. r=erahm
Zibi is working on replacing some string based APIs with some things that return
substrings, so we could use this.

Alternatively he'd have to do something like:

  Compare(myCSubstring, nsDependentCSubstring(aTag, strlen(aTag)))

or something of that sort, which looks a bit uglier.

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

--HG--
extra : moz-landing-system : lando
2019-10-29 20:09:00 +00:00
Boris Zbarsky 40d45356a8 Bug 1591481 part 1. Make NormalizeUSVString fallible. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D50691

--HG--
extra : moz-landing-system : lando
2019-10-29 00:24:10 +00:00
Alex Henrie 599d6a6962 Bug 1589786 - Handle surrogate pairs in nsFind. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D49822

--HG--
extra : moz-landing-system : lando
2019-10-25 01:15:07 +00:00
Mihai Alexandru Michis a5cac4d597 Backed out changeset 0063a5b2f5b3 (bug 1589786) for causing bustages in TestDLLBlocklist.obj and sandboxBroker.i_o CLOSED TREE 2019-10-24 19:41:56 +03:00
Alex Henrie 26a3356957 Bug 1589786 - Handle surrogate pairs in nsFind. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D49822

--HG--
extra : moz-landing-system : lando
2019-10-24 13:38:32 +00:00
Boris Zbarsky 17b508795a Bug 1589285 part 2. Add Span<const char> overloads of some XPCOM string methods. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D49532

--HG--
extra : moz-landing-system : lando
2019-10-17 22:09:46 +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
Hiroyuki Ikezoe 2eec537348 Bug 1573648 - Introduce ToDoubleAllowTrailingChars and ToFloatAllowTrailingChars. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D42239

--HG--
extra : moz-landing-system : lando
2019-08-16 22:38:01 +00:00
Nathan Froyd f21661fdf8 Bug 1571759 - add nsTArray::EmplaceBack; r=erahm
Much preferred to `AppendElement(T(...))`.

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

--HG--
extra : moz-landing-system : lando
2019-08-16 00:18:57 +00:00
Henri Sivonen c562792b2e Bug 1490593 - Move FFI for encoding_rs::mem to a vendored crate. r=froydnj
Also remove most C++-side optimizations for avoiding calls to Rust
for short strings now that we have LTO between C++ and Rust. Since
LTO still leaves the overhead of one function call layer, inlined
function call avoidance optimization is left in place in the
IsUTF8 and in the 8-bit IsASCII cases for which perfherder flags
the difference as significant for the length 15.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 07:53:34 +00:00
Henri Sivonen a07d039783 Bug 1543693 - Add missing nsReadableUtils wrappers for conversions between UTF-8 and Latin1 XPCOM string. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D27234

--HG--
extra : moz-landing-system : lando
2019-04-12 17:49:11 +00:00
Cameron McCormack ad0b101ef6 Bug 1543582 - Only include quotes around XPCOM strings in MOZ_DBG, not operator<<. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D27031

--HG--
extra : moz-landing-system : lando
2019-04-11 23:44:57 +00:00
Sylvestre Ledru ef0bfc3822 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Cameron McCormack eedb6aebd4 Bug 1538081 - Part 3: Add operator<<(ostream&) definitions for a few common types. r=froydnj,gerald
Depends on D25023

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

--HG--
extra : moz-landing-system : lando
2019-03-30 04:26:26 +00:00
Ciure Andrei 615006146b Backed out 4 changesets (bug 1538081) for causing BaseElf.cpp bustages CLOSED TREE
Backed out changeset ced61a86c74c (bug 1538081)
Backed out changeset d6d331abbf0e (bug 1538081)
Backed out changeset 26df801e44db (bug 1538081)
Backed out changeset 113ac188a69e (bug 1538081)
2019-03-30 03:02:15 +02:00
Cameron McCormack 91e3ec9952 Bug 1538081 - Part 3: Add operator<<(ostream&) definitions for a few common types. r=froydnj,gerald
Depends on D25023

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

--HG--
extra : moz-landing-system : lando
2019-03-30 00:21:24 +00:00
Nathan Froyd dc25b5a9dc Bug 1539605 - add fast paths for integer formatting on nsTSubstring; r=erahm
This way we don't have to go through a bunch of printf nonsense, and we
ought to be able to arrive at optimized routines that take advantage of
constant radices, etc.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 19:38:53 +00:00
Emilio Cobos Álvarez bdf43f53c2 Bug 1536689 - Make AssertValidDependentString asserts more fatal. r=bholley
We should catch these issues ASAP. This NS_ASSERTION also bit me in the past.

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

--HG--
extra : moz-landing-system : lando
2019-03-20 23:13:14 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Henri Sivonen 49e3dc22ba Bug 1519337 - Adjust bound checks in UTF8CharEnumerator. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D16290

--HG--
extra : moz-landing-system : lando
2019-01-16 17:09:32 +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
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
Ehsan Akhgari 490e611801 Bug 1508472 - Part 5: Fifth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal. I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 10:30:46 +00:00
Andrew McCreight 68a1d4dad7 Bug 1508818, part 3 - Shrink comments so they don't get poorly reflowed by clang-format. r=froydnj
Clang format does not always reflow comments correctly to get them
within 80 columns.

The major categories of failures I have noticed in xpcom/ are:

- Comments that are lists. I fixed these by manually getting them so
  they'll be within 80 columns after clang-format runs.

- Comments intermixed with lists of things like enums, initializers,
  or even fields in a class. It doesn't seem to associate the comment
  with the item in the list correctly. The worst cases of these happen
  when it changes initializer lists from having commas at the start of
  each item to having them at the end. In the initializer comma cases,
  I fixed them by making the commas at the end, so clang-format won't
  mix things up. For other cases, I often moved the comment for an
  item onto its own line, because it was not possible to have both the
  comment and the item on the same line and stay within 80 columns.

- One odd case is nsEnumeratorUtils.cpp, where the end of line comment
  after a NS_DECL macro confused clang-format and made it stop
  realizing that the NS_DECL thing was a complete statement. I also
  added a blank line to that file before a declaration because I think
  that is better.

Depends on D13183

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

--HG--
extra : moz-landing-system : lando
2018-11-28 21:06:09 +00:00
Karl Tomlinson 97f2efff13 Bug 1499212 align Replace/Insert/AppendLiteral parameter restrictions with those of AssignLiteral r=dbaron
There is no advantage in making these methods more restrictive on their
parameters than AssignLiteral.

The current implementation of the AppendLiteral overloads for equivalent
char_types is more permissive than AssignLiteral, but comments in the
implementation mention the possible optimization used in AssignLiteral and so
are assuming a similar constant and static storage duration restriction on its
parameter.  The optimization may never be implemented, but clients that would
benefit from support for non-constant or non-static parameters are also
expected to be rare, so there is little value in ruling out the optimization
at this stage.

ReplaceLiteral currently uses the AssignLiteral optimization.

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

--HG--
extra : moz-landing-system : lando
2018-10-19 01:07:41 +00:00
Karl Tomlinson 539768fc12 Bug 1499212 - document that Literal parameters must have a null terminator r=dbaron
A character array initialized with a list of character literals will not
necessarily have a trailing null-terminator required for AssignLiteral or
trimmed in EqualsLiteral.

Depends on D8775

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

--HG--
extra : moz-landing-system : lando
2018-10-19 01:26:21 +00:00
Karl Tomlinson ba7a754a76 Bug 1499212 adjust Literal method doc so as not to imply that |this| must be a literal string r=dbaron
Depends on D8774

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

--HG--
extra : moz-landing-system : lando
2018-10-19 01:07:10 +00:00
Karl Tomlinson aa77ee3384 Bug 1499212 - document reasons for restrictions on EqualsLiteral parameter r=dbaron
"Bound" is the term used in the C++ standard to describe the number of
elements in an array.

EqualsLiteral has no opportunity to optimize for constant and static storage
duration parameters.

Depends on D8773

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

--HG--
extra : moz-landing-system : lando
2018-10-19 00:57:49 +00:00
Karl Tomlinson a53090cdff Bug 1499212 - suggest non-ASCII Assign for non-static-const same-char_type array parameters r=dbaron
There is no advantage in AssignASCII() for char, and AssignASCII() does not
exist for char16_t array and char_type.  Similarly for ReplaceASCII and
AppendASCII.  This AssignLiteral() overload already says it is not only for
ASCII.

Depends on D8771

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

--HG--
extra : moz-landing-system : lando
2018-10-18 21:53:33 +00:00
Karl Tomlinson 70af2a5543 Bug 1499212 Document static storage requirement for same-char_type AssignLiteral overload r=dbaron
Depends on D8770

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

--HG--
extra : moz-landing-system : lando
2018-10-16 21:09:27 +00:00