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

2075 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 0fef58f699 Bug 1664844 - Add DebugOnly::inspect member function. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D90133
2020-09-18 06:33:12 +00:00
Csoregi Natalia 2306d2079a Backed out 11 changesets (bug 1663924, bug 1664844) for multiple failures. CLOSED TREE
Backed out changeset 2da9fde7a109 (bug 1663924)
Backed out changeset 9353759cc783 (bug 1663924)
Backed out changeset 309354891d60 (bug 1663924)
Backed out changeset 4e51461c369c (bug 1663924)
Backed out changeset e3196b68932c (bug 1663924)
Backed out changeset 25b16cbae152 (bug 1664844)
Backed out changeset e02961ac5ee7 (bug 1663924)
Backed out changeset dde2058c20ef (bug 1663924)
Backed out changeset a80f52551e3a (bug 1663924)
Backed out changeset 0c37ce712c2c (bug 1663924)
Backed out changeset 8cc5dcc86f40 (bug 1663924)
2020-09-18 04:52:32 +03:00
Simon Giesecke db717b00e5 Bug 1664844 - Add DebugOnly::inspect member function. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D90133
2020-09-17 08:44:30 +00:00
Simon Giesecke 59cd4601d7 Bug 1663902 - Avoid gcc emitting lots of static constructors for UnusedZero<T&>::defaultValue. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D90359
2020-09-16 13:58:49 +00:00
Razvan Maries 559e163f24 Backed out 9 changesets (bug 1663924, bug 1664844) for Linux Mochitests leaks. CLOSED TREE
Backed out changeset 8d28611ac9b2 (bug 1663924)
Backed out changeset e0b0b3a19544 (bug 1663924)
Backed out changeset 884e286909f9 (bug 1663924)
Backed out changeset ffed28f0b547 (bug 1664844)
Backed out changeset 4c22c3c8aa28 (bug 1663924)
Backed out changeset fcaed021597c (bug 1663924)
Backed out changeset 30394cbcaaf6 (bug 1663924)
Backed out changeset 014bcf5d13b9 (bug 1663924)
Backed out changeset ccf09dfa817a (bug 1663924)
2020-09-16 19:16:21 +03:00
Simon Giesecke ab0b7510ad Bug 1665026 - Prevent ToResultInvoke from being instantiated with a raw pointer result type. r=janv
Differential Revision: https://phabricator.services.mozilla.com/D90264
2020-09-16 15:11:56 +00:00
Simon Giesecke 7c10b87921 Bug 1664844 - Add DebugOnly::inspect member function. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D90133
2020-09-16 14:56:02 +00:00
Simon Giesecke 720fbb0265 Bug 1661404 - Add MOZ_TO_RESULT_INVOKE_TYPED macro. r=janv
Differential Revision: https://phabricator.services.mozilla.com/D90368
2020-09-16 10:18:19 +00:00
Gerald Squelart b3972fb3c4 Bug 1657033 - There is no more need for JSONWriteFunc::WriteLiteral - r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D86193
2020-09-14 01:48:39 +00:00
Gerald Squelart 782cf5d3ad Bug 1657033 - Use Span<const char> in JSONWriter - r=froydnj
In most situations, JSONWriter users already know string lengths (either directly, or through `nsCString` and friends), so we should keep this information through JSONWriter and not recompute it again.
This also allows using JSONWriter with sub-strings (e.g., from a bigger buffer), without having to create null-terminated strings.

Public JSONWriter functions have overloads that accept literal strings.

Differential Revision: https://phabricator.services.mozilla.com/D86192
2020-09-14 02:33:20 +00:00
Gerald Squelart 89b62c22de Bug 1657033 - Make `MakeStringSpan` constexpr - r=froydnj
MakeStringSpan("...") will be able to construct spans from string literals at compile time.

Differential Revision: https://phabricator.services.mozilla.com/D86190
2020-09-14 01:44:39 +00:00
Simon Giesecke 250dabd821 Bug 1663628 - Make Maybe::extract work with MOZ_NON_AUTOABLE type T. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D89445
2020-09-08 13:22:16 +00:00
Jan Varga d4d58eddc9 Bug 1663648 - Fix mozilla::Result::map's return type definition; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D89457
2020-09-08 14:39:41 +00:00
Simon Giesecke 2d21df0e59 Bug 1661428 - Support PackingVariant::NullIsOk also with non-trivially-default-constructible V. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88444
2020-09-03 14:14:41 +00:00
Simon Giesecke d85bd68479 Bug 1661457 - Add in-place constructor to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88418
2020-09-02 17:56:35 +00:00
Simon Giesecke 5cacc3e1dc Bug 1661502 - Make Result move-only. r=froydnj,jandem
Differential Revision: https://phabricator.services.mozilla.com/D88443
2020-09-02 17:56:23 +00:00
Simon Giesecke bf7bd90871 Bug 1661497 - Make DebugOnly work with move-only value types. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88442
2020-09-02 17:56:10 +00:00
Simon Giesecke bd28698eb3 Bug 1661428 - Use CompactPair instead of Variant for trivially default-constructible V and UnusedZero E. r=froydnj
It seems that the clang toolchain has trouble optimizing away the tag access in
a `mozilla::Variant`. Use of a `CompactPair` seems to be better when `E` is
small (all cases where `UnusedZero<E>` is true are small right now anyway).
While this doesn't change `sizeof(Result<V, E>)` in most cases, it makes
the generated code simpler/smaller: As of now, this reduce the overall VM size
of libxul.so by ca. 59K.

Without additional effort, this requires and leads to default-construction of
a `V` even in cases where it is never accessed, so this is restricted to
trivially default-constructible `V` for now.

This could be avoided by replacing  `CompactPair<V, E>` by
`CompactPair<AlignedStorage2<V>, E>`.

Differential Revision: https://phabricator.services.mozilla.com/D88393
2020-09-02 17:55:55 +00:00
Razvan Maries eae150a880 Backed out 5 changesets (bug 1661457, bug 1661428, bug 1661497, bug 1661502) for build bustages on Result.h. CLOSED TREE
Backed out changeset fbf42b3b51f3 (bug 1661428)
Backed out changeset 83f3f36d540f (bug 1661457)
Backed out changeset 8a9dce0d08ce (bug 1661502)
Backed out changeset 733df139089a (bug 1661497)
Backed out changeset fca770fc0956 (bug 1661428)
2020-09-02 19:44:47 +03:00
Simon Giesecke 261cda7f20 Bug 1661428 - Support PackingVariant::NullIsOk also with non-trivially-default-constructible V. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88444
2020-09-02 16:31:43 +00:00
Simon Giesecke 156682b3c2 Bug 1661457 - Add in-place constructor to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88418
2020-09-02 16:23:13 +00:00
Simon Giesecke d4179392a0 Bug 1661502 - Make Result move-only. r=froydnj,jandem
Differential Revision: https://phabricator.services.mozilla.com/D88443
2020-09-02 16:23:01 +00:00
Simon Giesecke 80d380f0ed Bug 1661497 - Make DebugOnly work with move-only value types. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88442
2020-09-02 16:22:38 +00:00
Simon Giesecke d5f6d76c5a Bug 1661428 - Use CompactPair instead of Variant for trivially default-constructible V and UnusedZero E. r=froydnj
It seems that the clang toolchain has trouble optimizing away the tag access in
a `mozilla::Variant`. Use of a `CompactPair` seems to be better when `E` is
small (all cases where `UnusedZero<E>` is true are small right now anyway).
While this doesn't change `sizeof(Result<V, E>)` in most cases, it makes
the generated code simpler/smaller: As of now, this reduce the overall VM size
of libxul.so by ca. 59K.

Without additional effort, this requires and leads to default-construction of
a `V` even in cases where it is never accessed, so this is restricted to
trivially default-constructible `V` for now.

This could be avoided by replacing  `CompactPair<V, E>` by
`CompactPair<AlignedStorage2<V>, E>`.

Differential Revision: https://phabricator.services.mozilla.com/D88393
2020-09-02 16:22:25 +00:00
Kartikaya Gupta 49c359630a Bug 1661798 - Have the LinkedList destructor emit the buggy template specialization. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88663
2020-08-28 20:07:26 +00:00
Simon Giesecke 1997b4ea0d Bug 1661083 - Support raw pointers with MOZ_TO_RESULT_INVOKE. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88168
2020-08-28 15:50:49 +00:00
Simon Giesecke ff85972891 Bug 1661476 - Prevent Result<const V, E> or Result<V, const E> from being instantiated. r=froydnj
Also, remove the existing uses of Result<const nsCString, nsresult> in URLPreloader
and Result<CryptoScheme, const nsCString> in SampleIterator.

Differential Revision: https://phabricator.services.mozilla.com/D88419
2020-08-28 14:16:35 +00:00
Razvan Maries 7a010f17ae Backed out 11 changesets (bug 1661083, bug 1661085, bug 1661084) for build bustages on ResultExtensions.h. CLOSED TREE
Backed out changeset 962967831dd4 (bug 1661085)
Backed out changeset 8e61a7d2daf9 (bug 1661085)
Backed out changeset 1edbc081c9f0 (bug 1661085)
Backed out changeset c640f4126079 (bug 1661085)
Backed out changeset b5fc9ebaac12 (bug 1661085)
Backed out changeset 4e3faaadccb6 (bug 1661085)
Backed out changeset 522cdd011e03 (bug 1661085)
Backed out changeset 896e47fc24e3 (bug 1661085)
Backed out changeset bf4043d4ce8e (bug 1661085)
Backed out changeset d0162bb5012e (bug 1661084)
Backed out changeset f0e7db520938 (bug 1661083)
2020-08-28 16:27:58 +03:00
Simon Giesecke a7f224accb Bug 1661083 - Support raw pointers with MOZ_TO_RESULT_INVOKE. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88168
2020-08-28 10:02:36 +00:00
Jan Varga ecaff7daea Bug 1659673 - Add the `mozilla::Result::orElse` method; r=froydnj,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D87418
2020-08-24 14:44:50 +00:00
Jan Varga d749be0c59 Bug 1659660 - Improve documentation and testing for mozilla::Result::map and mozilla::Result::mapErr; r=froydnj,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D87414
2020-08-20 11:04:12 +00:00
Butkovits Atila 850817430e Backed out 3 changesets (bug 1658874, bug 1658324, bug 1659660) for bustage at ActorsParent.cpp. CLOSED TREE
Backed out changeset b69e256013a3 (bug 1659660)
Backed out changeset 4939692a9047 (bug 1658874)
Backed out changeset e27fb7cd29fe (bug 1658324)
2020-08-20 13:57:20 +03:00
Jan Varga f66e9112b5 Bug 1659660 - Improve documentation and testing for mozilla::Result::map and mozilla::Result::mapErr; r=froydnj,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D87414
2020-08-20 09:22:09 +00:00
Jeff Gilbert 0d33c47098 Bug 1656545 - Range cannot support nullptr with non-zero length. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87528
2020-08-20 00:33:52 +00:00
Jan Varga 246bfa7db7 Bug 1659962 - Add additional MOZ_ARG_* macros; r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D87579
2020-08-19 14:31:40 +00:00
Jan Varga 8773058b99 Bug 1659909 - ToResultInvoke should also work with RefPtr/nsCOMPtr on win32; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D87556
2020-08-19 14:34:06 +00:00
Eugen Sawin 9caff81fa1 Bug 1623715 - [4.1] Fix LinkedList::length() for a const context. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84543
2020-08-18 17:29:07 +00:00
Razvan Maries 1cad430a1a Backed out 7 changesets (bug 1623715) for build bustages on nsWindow.cpp. CLOSED TREE
Backed out changeset 9704afdeefb1 (bug 1623715)
Backed out changeset 2e7e298cfe27 (bug 1623715)
Backed out changeset 579df1a653ee (bug 1623715)
Backed out changeset 4361ef84e780 (bug 1623715)
Backed out changeset 898972ec680c (bug 1623715)
Backed out changeset a118a4d72bef (bug 1623715)
Backed out changeset 4ff55894774d (bug 1623715)
2020-08-18 18:38:43 +03:00
Eugen Sawin 9ee999f3c0 Bug 1623715 - [4.1] Fix LinkedList::length() for a const context. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84543
2020-08-18 14:37:27 +00:00
Dorel Luca 6e3ab7e5fa Backed out 7 changesets (bug 1623715) for Linting failure and android build bustage. CLOSED TREE
Backed out changeset c8ca1d1866e7 (bug 1623715)
Backed out changeset 1b7c3fb0da3b (bug 1623715)
Backed out changeset 4887dea37231 (bug 1623715)
Backed out changeset 47f3eb481909 (bug 1623715)
Backed out changeset 6e7ce9e5f89b (bug 1623715)
Backed out changeset ddff358f800e (bug 1623715)
Backed out changeset cd585490e79b (bug 1623715)
2020-08-18 00:20:24 +03:00
Eugen Sawin e7ef0233d7 Bug 1623715 - [4.1] Fix LinkedList::length() for a const context. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84543
2020-08-17 20:37:37 +00:00
Simon Giesecke fa7f470279 Bug 1658528 - Add MOZ_TO_RESULT_INVOKE macro. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D75754
2020-08-17 06:34:39 +00:00
Simon Giesecke 531508b985 Bug 1658524 - Make ToResultInvoke also accept RefPtr<T>/nsCOMPtr<T>. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D86692
2020-08-12 18:33:14 +00:00
Tom Ritter 73764ca6a5 Bug 1656896 - Improve the Tainting macros and add unit tests r=froydnj
The patch:
 - Changes from an explicit capture in MOZ_VALIDATE_AND_GET_HELPER3/MOZ_IS_VALID
   to a default capture, to support referencing local variables in conditions.
 - Moves things around in Tainting.h and adds comments
 - Adds unit tests for the macros

Differential Revision: https://phabricator.services.mozilla.com/D85889
2020-08-07 19:14:22 +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 48dd75b228 Bug 1653335 - Add/fix constructors and deduction guides for Span. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83813
2020-08-07 07:42:52 +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
David Major 7bdbf197ee Bug 1657455 - Give EnumSet an assignment operator r=sg
Newer clangs complain that we explicitly defined a copy constructor but not a copy assignment.

Differential Revision: https://phabricator.services.mozilla.com/D86061
2020-08-06 20:40:37 +00:00
Kagami Sascha Rosylight b6115988e8 Bug 1656041 - Part 2: Return a struct from GetFrameFromDirection r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85317
2020-08-04 15:23:47 +00:00