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

1492 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 43f743214c Bug 1667957 - Provide functions that convert an integer to a decimal nsAutoTString. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D91716
2020-10-07 08:00:13 +00:00
Butkovits Atila c7a174ef52 Backed out changeset 6b9081a6e594 (bug 1667957) for causing bustage on nsString.h. CLOSED TREE 2020-10-06 20:59:53 +03:00
Simon Giesecke 12f9785cf8 Bug 1667957 - Provide functions that convert an integer to a decimal nsAutoTString. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D91716
2020-10-06 16:26:55 +00:00
Simon Giesecke e029dbe8b6 Bug 1665850 - Remove workaround in RestartBulkWrite that's no longer necessary. r=xpcom-reviewers,nika
It was necessary earlier because the include for ResultExtensions.h was missing.

Differential Revision: https://phabricator.services.mozilla.com/D90676
2020-09-21 13:14:40 +00:00
Simon Giesecke 2e065c64d6 Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem
Among other things, there were some misuses of std::forward, and
GenericErrorResult was (presumably accidentally) instatiated with
references as the template argument type, e.g. const nsresult&,
which circumvented the check for not calling it with NS_OK in
ResultExtensions.h

Differential Revision: https://phabricator.services.mozilla.com/D90561
2020-09-21 13:12:48 +00:00
Butkovits Atila 270e7e2200 Backed out 5 changesets (bug 1665927, bug 1665614, bug 1665850) for causing bustage on Result.h. CLOSED TREE
Backed out changeset 1467e76399e8 (bug 1665927)
Backed out changeset ebd4dfbc0a88 (bug 1665850)
Backed out changeset 5e23340e3b39 (bug 1665850)
Backed out changeset 5bc547e7a773 (bug 1665850)
Backed out changeset 8d88afb85a78 (bug 1665614)
2020-09-21 15:25:16 +03:00
Simon Giesecke 4e68d4412f Bug 1665850 - Remove workaround in RestartBulkWrite that's no longer necessary. r=xpcom-reviewers,nika
It was necessary earlier because the include for ResultExtensions.h was missing.

Differential Revision: https://phabricator.services.mozilla.com/D90676
2020-09-21 11:09:16 +00:00
Simon Giesecke 3b0420646e Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem
Among other things, there were some misuses of std::forward, and
GenericErrorResult was (presumably accidentally) instatiated with
references as the template argument type, e.g. const nsresult&,
which circumvented the check for not calling it with NS_OK in
ResultExtensions.h

Differential Revision: https://phabricator.services.mozilla.com/D90561
2020-09-21 10:38:19 +00:00
Nathan Froyd 1ceeaca6f6 Bug 1662566 - make nsTSubstringSplit_Iter an STL forward iterator; r=xpcom-reviewers,sg
As long as we're following the STL guidelines on how to do iterators, we
should be annotating things with the bits that the STL iterator support
wants to see.

Differential Revision: https://phabricator.services.mozilla.com/D89042
2020-09-02 14:26:47 +00:00
Simon Giesecke f77f8fd84c Bug 1659674 - Change BulkWrite to return mozilla::Result. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87419
2020-08-21 09:54:48 +00:00
Bogdan Tara a904137456 Backed out changeset 0327b662a05f (bug 1659674) for nsStorageStream related central bustage CLOSED TREE 2020-08-20 02:58:41 +03:00
Simon Giesecke 9352526320 Bug 1659674 - Change BulkWrite to return mozilla::Result. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87419
2020-08-19 14:39:03 +00:00
Simon Giesecke 1a9da56b94 Bug 1653335 - Get rid of MakeSpan functions. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83818
2020-08-07 07:50:04 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Simon Giesecke dea5b543db Bug 1653335 - Remove uses of MakeSpan in return statements. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83812
2020-08-07 07:42:50 +00:00
Simon Giesecke 313a0e1e7f Bug 1651323 - Add MOZ_LIFETIME_BOUND attribute to nsTLiteralString AsString and conversion operator. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D82682
2020-07-10 12:16:20 +00:00
Nick Alexander 1b75555dc7 Bug 1651136 - Part 1: Allow (and mark) certain xpcom/ headers as non-XPCOM. r=froydnj,bytesized
`nscore.h` includes `xpcom-config.h` which need not be generated for
non-XPCOM consumers.  In additon, `nullptr` and `bool` are C++
keywords, so at least some of the comments were dated.

The added include lines address transitive consumers of `nscore.h`.

Differential Revision: https://phabricator.services.mozilla.com/D82640
2020-07-08 22:57:26 +00:00
Sylvestre Ledru caf785c695 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D82178
2020-07-04 09:38:43 +00:00
Simon Giesecke 70b5ff0968 Bug 1648010 - Remove NS_LITERAL_STRING and NS_LITERAL_CSTRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80862
2020-07-01 22:48:43 +00:00
Simon Giesecke 9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke e3c223da3e Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80861
2020-07-01 08:34:12 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Simon Giesecke 017f9a1fc0 Bug 1648010 - Add user-defined string literals. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D81125
2020-06-29 17:02:35 +00:00
Mihai Alexandru Michis 3e115816f2 Backed out changeset d1416483de0d (bug 1648010) for causing bustages in nsTLiteralString.h
CLOSED TREE
2020-06-29 17:53:38 +03:00
Simon Giesecke 62fd821c3a Bug 1648010 - Add user-defined string literals. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D81125
2020-06-29 14:26:44 +00:00
Simon Giesecke 7b417b5ef3 Bug 1648391 - Use rhs-first optimization from IsDependentOn in IsDependentOnWithLength. r=froydnj
Depends on D81054

Differential Revision: https://phabricator.services.mozilla.com/D81055
2020-06-25 11:53:48 +00:00
Simon Giesecke bebf92b951 Bug 1648391 - Use logical or rather than binary or to allow for short-circuit evaluation. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D81054
2020-06-25 11:49:50 +00:00
Simon Giesecke 9a81912985 Bug 1644163 - Avoid traversing a nsTSubstring tuple twice to determine its length and dependency on a buffer in Replace. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78695
2020-06-18 08:03:02 +00:00
Simon Giesecke c2985d448f Bug 1644163 - Avoid traversing a nsTSubstring tuple twice to determine its length and dependency on a buffer in Assign. r=froydnj
This also extracts new private member functions AssignOwned and AssignNonDependent.

Furthermore, it fixes an inconsistency for the dependent case: Formerly,
this caused the substring tuple to be materialized into a linear string
infallibly, although the function was a fallible one. It only assigned the
resulting string fallibly, but this would never have failed, since the
allocation already happened before.

Differential Revision: https://phabricator.services.mozilla.com/D78694
2020-06-18 08:03:09 +00:00
Simon Giesecke 1a9edbd8d5 Bug 1644163 - Avoid traversing a nsTSubstring tuple twice to determine its length and dependency on a buffer in Append. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78693
2020-06-18 08:02:52 +00:00
Cosmin Sabou 3b4176468a Backed out 3 changesets (bug 1644163) for mochitest asan failures. CLOSED TREE
Backed out changeset 954c49edcc76 (bug 1644163)
Backed out changeset 8d78185301f1 (bug 1644163)
Backed out changeset 338bd5525594 (bug 1644163)
2020-06-18 13:20:43 +03:00
Simon Giesecke c852bfeee1 Bug 1644163 - Avoid traversing a nsTSubstring tuple twice to determine its length and dependency on a buffer in Replace. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78695
2020-06-18 08:03:02 +00:00
Simon Giesecke b556d0f13b Bug 1644163 - Avoid traversing a nsTSubstring tuple twice to determine its length and dependency on a buffer in Assign. r=froydnj
This also extracts new private member functions AssignOwned and AssignNonDependent.

Furthermore, it fixes an inconsistency for the dependent case: Formerly,
this caused the substring tuple to be materialized into a linear string
infallibly, although the function was a fallible one. It only assigned the
resulting string fallibly, but this would never have failed, since the
allocation already happened before.

Differential Revision: https://phabricator.services.mozilla.com/D78694
2020-06-18 08:03:09 +00:00
Simon Giesecke cdcb021cc4 Bug 1644163 - Avoid traversing a nsTSubstring tuple twice to determine its length and dependency on a buffer in Append. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78693
2020-06-18 08:02:52 +00:00
Sylvestre Ledru 63be8d152d Bug 1519636 - Reformat recent changes to the Google coding style r=necko-reviewers,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D77580
2020-05-30 09:55:27 +00:00
Emilio Cobos Álvarez 70ab539dc0 Bug 1641245 - Fix silly windows build bustage.
MANUAL PUSH: bustage on a CLOSED TREE.
2020-05-27 21:05:25 +02:00
Emilio Cobos Álvarez 54fd961a29 Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin
There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
2020-05-27 18:11:12 +00:00
Nicklas Boman 4f2fa0cfa7 Bug 1515419 - fixing ToNewCString (and ToNewUnicode as well) xpcom/string/nsReadableUtils.cpp r=froydnj,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D17411
2020-05-17 06:58:48 +00:00
Simon Giesecke 74b75d282b Bug 1634023 - Add deduction guides for Span. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D73040
2020-04-29 16:04:56 +00:00
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Tooru Fujisawa 8c0843c04c Bug 1432749 - Part 1: Add DefaultHasher for nsTString. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D67836

--HG--
extra : moz-landing-system : lando
2020-04-14 06:00:05 +00:00
Narcis Beleuzu 1783003a34 Backed out 3 changesets (bug 1624150, bug 1432749) for wpt failures at open-features-tokenization-top-left.html. CLOSED TREE
Backed out changeset ff061c8d9da9 (bug 1624150)
Backed out changeset 7e96d4acf317 (bug 1432749)
Backed out changeset a95f77732a1c (bug 1432749)
2020-04-13 22:51:48 +03:00
Tooru Fujisawa c2e8f7014c Bug 1432749 - Part 1: Add DefaultHasher for nsTString. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D67836

--HG--
extra : moz-landing-system : lando
2020-04-13 15:42:06 +00:00
Cameron McCormack 396dcd374d Bug 1629342 - Print string stats on process exit only if there is a leak. r=erahm,mccr8
I don't think anyone particularly cares about these stats.

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

--HG--
extra : moz-landing-system : lando
2020-04-12 17:23:12 +00:00
Eric Rahm 905929aa4e Bug 1627131 - Part 3: Move nsTString<T>::Contains implementation. r=xpcom-reviewers,sg
`kNotFound` isn't actually defined in `nsTStringRepr.h`.

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

--HG--
extra : moz-landing-system : lando
2020-04-08 10:46:25 +00:00
Eric Rahm 2c52ea2bb0 Bug 1627131 - Part 2: Move template function instantiations to definitions. r=xpcom-reviewers,sg
The instantiations of the externed templates need to be in the same translation unit as the definitions. Currently they work due to building in unified mode.

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

--HG--
extra : moz-landing-system : lando
2020-04-08 10:46:02 +00:00
Eric Rahm 034401e7e4 Bug 1627131 - Part 1: Add missing includes to xpcom/string. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D69466

--HG--
extra : moz-landing-system : lando
2020-04-03 21:08:13 +00:00
André Bargull 14ca007916 Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj
Also adds missing includes in some files, these were previously only transivitely
included through mozilla/TypeTraits.h.

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

--HG--
extra : moz-landing-system : lando
2020-03-28 16:00:09 +00:00
André Bargull f70fd1c1bd Bug 1625138 - Part 37: Replace mozilla::IsSame with std::is_same in xpcom/. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68556

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:21 +00:00
André Bargull 9ad58ea608 Bug 1625138 - Part 13: Replace mozilla::IsUnsigned with std::is_unsigned. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68368

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:14 +00:00