Christian Holler
d105e402b1
no bug - TSan library excludes miss libdconfsettings. r=Gankro
...
Differential Revision: https://phabricator.services.mozilla.com/D93506
2020-10-14 19:35:24 +00:00
Cameron McCormack
cff9802c01
Bug 1656114 - Part 2: Add mozilla::BitSet. r=froydnj
...
Adding this to be used when the bit set needs to be sent across IPC.
Differential Revision: https://phabricator.services.mozilla.com/D87186
2020-10-11 22:03:33 +00:00
Sylvestre Ledru
d9cd198ba1
Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers,dragana
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D92459
2020-10-06 16:12:00 +00:00
Simon Giesecke
bd5cfda423
Bug 1669421 - Make andThen accept a function that accepts a rvalue reference. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D92552
2020-10-06 09:03:14 +00:00
Paul Bone
e4588196e4
Bug 1668421 - Fix a commeint in fallible.h r=glandium
...
Differential Revision: https://phabricator.services.mozilla.com/D92017
2020-10-05 00:50:31 +00:00
Alexis Beingessner
dc6f1e5b44
Bug 1668750 - manually expand JammedWithFlags tests for compat with clang-cl-9. r=decoder
...
I have no idea what the issue is, but this fixes it. I figure it's not
worth putting too much effort into since this was just to make the tests
as DRY as possible, and not actually important.
Differential Revision: https://phabricator.services.mozilla.com/D92237
2020-10-02 15:00:28 +00:00
Alexis Beingessner
4484175a12
Bug 1601980 - Introduce a MOZ_ATOMIC_BITFIELDS macro. r=njn
...
Differential Revision: https://phabricator.services.mozilla.com/D91622
2020-10-01 08:25:15 +00:00
Simon Giesecke
67084ddd9b
Bug 1666216 - Enable ScopedLogExtraInfo logging. r=dom-workers-and-storage-reviewers,janv
...
Differential Revision: https://phabricator.services.mozilla.com/D90877
2020-09-30 08:24:18 +00:00
Simon Giesecke
c711008a61
Bug 1666219 - Introduce QM_TRY_INSPECT to avoid unwrapping Result objects where not necessary. r=dom-workers-and-storage-reviewers,janv
...
Differential Revision: https://phabricator.services.mozilla.com/D90843
2020-09-29 10:57:14 +00:00
Simon Giesecke
e003e4d581
Bug 1667019 - Simplify moving of Results for PackingStrategy NullIsOk. r=emilio
...
No longer reset a moved-from Result to an error state, which required
UnusedZero<E>::GetDefaultValue, which was somewhat confusing, and might
also be inefficient. Leaving Result in a valid state, which might be a
success or error state is sufficient.
Differential Revision: https://phabricator.services.mozilla.com/D91250
2020-09-29 08:09:02 +00:00
Emilio Cobos Álvarez
3aa40e5fb9
Bug 1658571 - Add a missing "explicit" in a test.
...
MANUAL PUSH: unit test fix in CLOSED TREE
2020-09-24 19:51:46 +02:00
Emilio Cobos Álvarez
061fc9d988
Bug 1658571 - Add MainThreadWeakPtr and use it in PreloaderBase::RedirectSink. r=sg,smaug
...
Per matrix discussion, this is safer to uplift (instead of relying on
the RedirectSink being released on the main thread).
Differential Revision: https://phabricator.services.mozilla.com/D91270
2020-09-24 16:38:35 +00:00
Simon Giesecke
8804eb9be3
Bug 1666416 - Allow conversion from Result with convertible error type. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D90960
2020-09-22 11:24:08 +00:00
Simon Giesecke
ccdc97d011
Bug 1666422 - Add missing include for cstdint. r=sylvestre
...
Differential Revision: https://phabricator.services.mozilla.com/D90963
2020-09-22 08:52:51 +00:00
Simon Giesecke
32f7547296
Bug 1666200 - Support in-place construction of Result success value. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D90839
2020-09-21 13:15:13 +00:00
Simon Giesecke
2b1eb28b6a
Bug 1665927
- Use free LSB optimization for empty types with mozilla::Result. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D90699
2020-09-21 13:14:53 +00:00
Simon Giesecke
c8ed33ab9d
Bug 1665850 - Remove specifics for reference error types from mozilla::Result. r=emilio,jandem
...
Also update the documentation on optimizations and representation to
better reflect the current situation.
Differential Revision: https://phabricator.services.mozilla.com/D90662
2020-09-21 13:14:28 +00:00
Simon Giesecke
eaa00050e4
Bug 1665850 - Switch JS to use non-reference errors with mozilla::Result. r=jandem
...
Also switch optimizations for HasFreeLSB and existing tests to no longer
use references.
Differential Revision: https://phabricator.services.mozilla.com/D90661
2020-09-21 13:14:10 +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
Bogdan Tara
395ecea593
Backed out changeset a1e4531f2091 (bug 1666200) for TestResult.cpp related bustage CLOSED TREE
2020-09-21 15:55:42 +03:00
Simon Giesecke
2cf66d3f89
Bug 1666200 - Support in-place construction of Result success value. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D90839
2020-09-21 11:47:47 +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
6b3d1793e7
Bug 1665927
- Use free LSB optimization for empty types with mozilla::Result. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D90699
2020-09-21 11:09:31 +00:00
Simon Giesecke
f193981fb7
Bug 1665850 - Remove specifics for reference error types from mozilla::Result. r=emilio,jandem
...
Also update the documentation on optimizations and representation to
better reflect the current situation.
Differential Revision: https://phabricator.services.mozilla.com/D90662
2020-09-21 11:09:09 +00:00
Simon Giesecke
70bda1ef61
Bug 1665850 - Switch JS to use non-reference errors with mozilla::Result. r=jandem
...
Also switch optimizations for HasFreeLSB and existing tests to no longer
use references.
Differential Revision: https://phabricator.services.mozilla.com/D90661
2020-09-21 11:11:02 +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
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