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

615 Коммитов

Автор SHA1 Сообщение Дата
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
Jan Varga ead7da2d9c Bug 1732642 - Handle complex types in MOZ_TO_RESULT_INVOKE_MEMBER_TYPED; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D126785
2021-11-30 05:05:53 +00:00
Jan Varga a7f7389681 Bug 1731969 - Rename ToResultInvoke member function overloads to ToResultInvokeMember; r=dom-storage-reviewers,jari
Differential Revision: https://phabricator.services.mozilla.com/D126328
2021-11-30 05:05:53 +00:00
Andreas Farre 4cf077692f Bug 1733963 - Part 2: Add BitSet tests. r=glandium
Depends on D127447

Differential Revision: https://phabricator.services.mozilla.com/D127448
2021-11-09 12:34:51 +00:00
Marian-Vasile Laza 7241c1f9e9 Backed out 3 changesets (bug 1733963) for causing build bustages on TestEnumSet.cpp. CLOSED TREE
Backed out changeset 83b804a449c2 (bug 1733963)
Backed out changeset 434e10a0c39a (bug 1733963)
Backed out changeset d7d88b948f71 (bug 1733963)
2021-11-08 19:42:46 +02:00
Andreas Farre e7ee97fb29 Bug 1733963 - Part 2: Add BitSet tests. r=glandium
Depends on D127447

Differential Revision: https://phabricator.services.mozilla.com/D127448
2021-11-08 16:01:26 +00:00
Marian-Vasile Laza fca6bc6241 Backed out 3 changesets (bug 1733963) for causing build bustages on SyncedContext.h. CLOSED TREE
Backed out changeset de5c7a16378c (bug 1733963)
Backed out changeset f5f3a27abf60 (bug 1733963)
Backed out changeset cc3a0603f88a (bug 1733963)
2021-11-05 20:54:33 +02:00
Andreas Farre 694649bec3 Bug 1733963 - Part 2: Add BitSet tests. r=glandium
Depends on D127447

Differential Revision: https://phabricator.services.mozilla.com/D127448
2021-11-05 17:23:02 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Gerald Squelart 81d28b5530 Bug 1719959 - Better Tag type choice, fixed corresponding test - r=emilio
On some systems, uint_fast8_t may be as big as size_t! So the `static_assert(sizeof(aIndex) < sizeof(size_t))` could fail there. The better test here is to check for the expected type (uint_fast8_t).

Now, since uint_fast8_t can be bigger than 8 bits, we may as well choose it for variant sizes greater than 255, up to UINT_FAST8_MAX.
(The added parentheses help clang-format distinguish '<' for tests vs for templates.)

Differential Revision: https://phabricator.services.mozilla.com/D119574
2021-07-11 09:43:50 +00:00
Nika Layzell 0e22f3df51 Bug 1717808 - aIter must be valid after extracting last segment of a BufferList, r=glandium
When advancing to Beta, we stop adding sentinels after serialized data
in IPC::Message objects. These sentinels would cause all Extract calls
to not reach the end of the message buffer on Nightly. This patch fixes
an assertion failure which can occur when extract calls fully empty the
buffer, and the finished iterator is advanced by 0 bytes.

Differential Revision: https://phabricator.services.mozilla.com/D118838
2021-07-07 18:03:03 +00:00
Nika Layzell 5731c1747c Bug 1717526 - String's implicit conversion operator causes COW relocations, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D118430
2021-06-23 01:57:00 +00:00
Alexandru Michis e3d24b013a Backed out changeset 3beb01f5d643 (bug 1717526) for causing gtest failures in SpanTest.from_xpcom_collections
CLOSED TREE
2021-06-23 01:58:49 +03:00
Nika Layzell c14de7eabc Bug 1717526 - String's implicit conversion operator causes COW relocations, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D118430
2021-06-22 21:18:03 +00:00
Nika Layzell 599b58f458 Bug 1706374 - Part 13: Remove the event footer from an IPC::Message when deserializing, r=handyman,glandium
This unfortunately requires a new method to be added to BufferList to
support truncating the buffer to a particular iterator.

Differential Revision: https://phabricator.services.mozilla.com/D116666
2021-06-22 18:17:23 +00:00
Butkovits Atila 83f57b5c69 Backed out 22 changesets (bug 1714226, bug 1706374, bug 1713148) for causing build bustages on MessageChannel.cpp. CLOSED TREE
Backed out changeset ea469eaa54ca (bug 1713148)
Backed out changeset fd8523d5126e (bug 1713148)
Backed out changeset f2e5309c914c (bug 1713148)
Backed out changeset 2da57973ed55 (bug 1713148)
Backed out changeset 677e1ee99bb2 (bug 1713148)
Backed out changeset b4c0619e79bf (bug 1706374)
Backed out changeset c02fa459e77d (bug 1706374)
Backed out changeset 72dc6537cf0b (bug 1706374)
Backed out changeset 48088463c656 (bug 1706374)
Backed out changeset b09ae4c3a94b (bug 1706374)
Backed out changeset 04422175004b (bug 1706374)
Backed out changeset 110b2384e7d1 (bug 1706374)
Backed out changeset ab2b086abbd4 (bug 1706374)
Backed out changeset ffde07f73249 (bug 1706374)
Backed out changeset c6303af17ff4 (bug 1706374)
Backed out changeset 02249671c2f9 (bug 1706374)
Backed out changeset a6a5d05b5636 (bug 1706374)
Backed out changeset e21b6defb805 (bug 1706374)
Backed out changeset c72c5be9ddb1 (bug 1706374)
Backed out changeset 23cd961575a6 (bug 1706374)
Backed out changeset b412d6e9e145 (bug 1706374)
Backed out changeset a8ec285d6472 (bug 1714226)
2021-06-22 04:03:56 +03:00
Nika Layzell 344d8d6622 Bug 1706374 - Part 13: Remove the event footer from an IPC::Message when deserializing, r=handyman,glandium
This unfortunately requires a new method to be added to BufferList to
support truncating the buffer to a particular iterator.

Differential Revision: https://phabricator.services.mozilla.com/D116666
2021-06-21 21:53:11 +00:00
Toshihito Kikuchi deeb00a274 Bug 1695817 - Part 5: Add std::equal_range equivalent in MFBT. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D114598
2021-05-28 22:35:58 +00:00
Alexandru Michis 8fbcd44dc4 Backed out 9 changesets (bug 1695817) for causing bc failures in content/aboutThirdParty.js
CLOSED TREE

Backed out changeset 6b7f451e911e (bug 1695817)
Backed out changeset ad3ea67b3d70 (bug 1695817)
Backed out changeset b4f971059f3f (bug 1695817)
Backed out changeset 9c9a928d4a70 (bug 1695817)
Backed out changeset 4a9bcb38fddf (bug 1695817)
Backed out changeset 48c0eed38628 (bug 1695817)
Backed out changeset 7583675dccb1 (bug 1695817)
Backed out changeset e3f2bed63c33 (bug 1695817)
Backed out changeset 1c45ba4fba61 (bug 1695817)
2021-05-28 21:53:41 +03:00
Toshihito Kikuchi 0441dec54b Bug 1695817 - Part 5: Add std::equal_range equivalent in MFBT. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D114598
2021-05-28 15:32:31 +00:00
Butkovits Atila 3735a33d14 Backed out 9 changesets (bug 1695817) for causing build bustages. CLOSED TREE
Backed out changeset 49be1caf6501 (bug 1695817)
Backed out changeset 30f1382d6058 (bug 1695817)
Backed out changeset ab9fa7f3b633 (bug 1695817)
Backed out changeset b03b122438cc (bug 1695817)
Backed out changeset 812a6bbfbe0e (bug 1695817)
Backed out changeset 3551230a7522 (bug 1695817)
Backed out changeset c7354b48fbee (bug 1695817)
Backed out changeset 4860450c2e23 (bug 1695817)
Backed out changeset 29dee289f866 (bug 1695817)
2021-05-28 07:52:30 +03:00
Toshihito Kikuchi f86792fbca Bug 1695817 - Part 5: Add std::equal_range equivalent in MFBT. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D114598
2021-05-28 04:19:07 +00:00
Butkovits Atila 711401ea39 Backed out 9 changesets (bug 1695817) for causing failures at browser_all_files_referenced.js. CLOSED TREE
Backed out changeset df4086427aaf (bug 1695817)
Backed out changeset 119a24f8be08 (bug 1695817)
Backed out changeset fd277ae2a7b8 (bug 1695817)
Backed out changeset a2c86a645fa8 (bug 1695817)
Backed out changeset c73705233fc4 (bug 1695817)
Backed out changeset 0a80eea3c0fa (bug 1695817)
Backed out changeset 9af42c7a3ca7 (bug 1695817)
Backed out changeset a2d11a0849d5 (bug 1695817)
Backed out changeset ba3ddcc28cbf (bug 1695817)
2021-05-28 03:05:09 +03:00
Toshihito Kikuchi 1a79ad5407 Bug 1695817 - Part 5: Add std::equal_range equivalent in MFBT. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D114598
2021-05-27 21:14:14 +00:00
Gerald Squelart 5cbf88670f Bug 1710145 - Deduction guide RefPtr(already_AddRefed<T>) -> RefPtr<T> - r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D114809
2021-05-11 21:55:21 +00:00
Chris Fallin 2e5115af2e Bug 1704775 part 10 - Disable unsupported c++ tests. r=glandium
WASI doesn't support some c++ tests for threads, so
in this patch we just stubbed them out.

Differential Revision: https://phabricator.services.mozilla.com/D111815
2021-04-27 06:09:27 +00:00
Simon Giesecke ae75c3faa8 Bug 1601556 - Make Result<V, E> a literal type if V and E are literal types and PackingStrategy is not Variant. r=emilio
Also make CompactPair<A, B> a literal type if A and B are literal types,
and add MaybeStorageBase that ought to be used as a basis of MaybeStorage
in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D55930
2021-03-23 12:35:19 +00:00
Chris Peterson 7bc752e42b Bug 1571631 - Replace MOZ_MUST_USE with [[nodiscard]] in mfbt. r=sg
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

Depends on D108344

Differential Revision: https://phabricator.services.mozilla.com/D108345
2021-03-17 03:01:21 +00:00
Mike Hommey f00f1ea9b3 Bug 1690167 - Allocate some memory before running RandomNum tests. r=Gankra
Because the previous commit changed how MFBT tests are linked, they now
use mozjemalloc. Mozjemalloc randomizes small allocations, which id does
by using MFBT's RandomNum. The code in RandomNum, on mac, uses a system
API that allocates memory. So mozjemalloc has some code to handle the
recursion gracefully.

When the RandomNum test runs, it essentially only runs the RNG... which
goes on to allocate memory, which then goes into the RNG. Needless to
say, that doesn't go well. In typical cases, this is not the type of
things that would happen, but it does happen for that one test.

We work around the issue by allocating memory first, which is actually
hard, because compilers like to optimize unused allocations away. So we
turn the existing code into one that uses an allocation instead of an
array on the stack.

Differential Revision: https://phabricator.services.mozilla.com/D105242
2021-03-10 23:52:41 +00:00
Mike Hommey 9c0fcac97c Bug 1690167 - Change VsprintfLiteral/SprintfLiteral to rely on PrintfTarget. r=nika,Gankra,firefox-build-system-reviewers,mhentges
Instead of snprintf.

Because some standalone code uses those functions directly or indirectly,
and PrintfTarget lives in mozglue, they now need to depend on mozglue
instead of mfbt. Except logalloc/replay, which cherry-picks what it
uses, and the updater, for which we keep using vsnprintf.

Differential Revision: https://phabricator.services.mozilla.com/D103730
2021-03-10 23:52:40 +00:00
Mike Hommey 3e40e0ce40 Bug 1690167 - Move Sprintf.h and IntegerPrintfMacros.h next to Printf.h. r=jwalden
Which means they move from MFBT to mozglue.

Differential Revision: https://phabricator.services.mozilla.com/D103728
2021-03-10 23:52:39 +00:00
Andreea Pavel 64289058b6 Backed out 5 changesets (bug 1690167) for failing xpcshell at bootstrapSvc.js on a CLOSED TREE
Backed out changeset d28c0f11743f (bug 1690167)
Backed out changeset 3b2bebed9128 (bug 1690167)
Backed out changeset 7e925e90a251 (bug 1690167)
Backed out changeset f85934a2b7ad (bug 1690167)
Backed out changeset 6d83474e81bb (bug 1690167)
2021-02-17 07:10:58 +02:00
Tooru Fujisawa 037aa4c5dc Bug 1690274 - Part 2: Add mozilla::BitBloomFilter. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D104690
2021-02-16 22:07:05 +00:00
Tooru Fujisawa b1044551e9 Bug 1690274 - Part 1: Rename mozilla::BloomFilter to mozilla::CountingBloomFilter. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D104689
2021-02-16 22:07:05 +00:00
Mike Hommey 25c8cf7dd2 Bug 1690167 - Allocate some memory before running RandomNum tests. r=Gankra
Because the previous commit changed how MFBT tests are linked, they now
use mozjemalloc. Mozjemalloc randomizes small allocations, which id does
by using MFBT's RandomNum. The code in RandomNum, on mac, uses a system
API that allocates memory. So mozjemalloc has some code to handle the
recursion gracefully.

When the RandomNum test runs, it essentially only runs the RNG... which
goes on to allocate memory, which then goes into the RNG. Needless to
say, that doesn't go well. In typical cases, this is not the type of
things that would happen, but it does happen for that one test.

We work around the issue by allocating memory first, which is actually
hard, because compilers like to optimize unused allocations away. So we
turn the existing code into one that uses an allocation instead of an
array on the stack.

Differential Revision: https://phabricator.services.mozilla.com/D105242
2021-02-16 21:20:05 +00:00
Mike Hommey 622b111f9e Bug 1690167 - Change VsprintfLiteral/SprintfLiteral to rely on PrintfTarget. r=nika,Gankra,firefox-build-system-reviewers,mhentges
Instead of snprintf.

Because some standalone code uses those functions directly or indirectly,
and PrintfTarget lives in mozglue, they now need to depend on mozglue
instead of mfbt. Except logalloc/replay, which cherry-picks what it
uses.

Differential Revision: https://phabricator.services.mozilla.com/D103730
2021-02-16 21:20:04 +00:00
Mike Hommey 900d63959b Bug 1690167 - Move Sprintf.h and IntegerPrintfMacros.h next to Printf.h. r=jwalden
Which means they move from MFBT to mozglue.

Differential Revision: https://phabricator.services.mozilla.com/D103728
2021-02-16 21:20:03 +00:00
Mihai Alexandru Michis 9154148880 Backed out 4 changesets (bug 1690167) for causing cppunit failures in TestIntegerPrintfMacros.
CLOSED TREE

Backed out changeset 27dee66eba83 (bug 1690167)
Backed out changeset cfffb092a39f (bug 1690167)
Backed out changeset 87b2a2a66fd9 (bug 1690167)
Backed out changeset cac4879f50b4 (bug 1690167)
2021-02-13 00:07:00 +02:00
Mike Hommey 47675f5460 Bug 1690167 - Change VsprintfLiteral/SprintfLiteral to rely on PrintfTarget. r=nika,Gankra,firefox-build-system-reviewers,mhentges
Instead of snprintf.

Because some standalone code uses those functions directly or indirectly,
and PrintfTarget lives in mozglue, they now need to depend on mozglue
instead of mfbt. Except logalloc/replay, which cherry-picks what it
uses.

Differential Revision: https://phabricator.services.mozilla.com/D103730
2021-02-12 20:21:50 +00:00
Mike Hommey 6c2fd9938a Bug 1690167 - Move Sprintf.h and IntegerPrintfMacros.h next to Printf.h. r=jwalden
Which means they move from MFBT to mozglue.

Differential Revision: https://phabricator.services.mozilla.com/D103728
2021-02-12 20:21:49 +00:00
Nika Layzell f07fc1f61f Bug 1687391 - Avoid using a spinlock in ThreadSafeWeakReference, r=glandium,mccr8,Gankra,sg
This new approach to weak references is roughly modeled after the approach used
by Rust's Arc<T>, and uses an atomic compare-and-swap loop to perform weak to
strong reference upgrades. This approach ends up moving the strong reference
count out of the tracked object and into the weak reference object, as the
strong reference count atomic needs to outlife the object itself.

Rust's Arc Weak::upgrade implementation:
d98d2f57d9/library/alloc/src/sync.rs (L1806-L1837)

Differential Revision: https://phabricator.services.mozilla.com/D102245
2021-02-03 17:00:04 +00:00
Bogdan Tara 369c9ff89b Backed out changeset cf95a79e64f6 (bug 1687391) for bustges complaining about ThreadSafeWeakPtr CLOSED TREE 2021-02-03 18:39:22 +02:00
Nika Layzell 33d14ac4a6 Bug 1687391 - Avoid using a spinlock in ThreadSafeWeakReference, r=glandium,mccr8,Gankra,sg
This new approach to weak references is roughly modeled after the approach used
by Rust's Arc<T>, and uses an atomic compare-and-swap loop to perform weak to
strong reference upgrades. This approach ends up moving the strong reference
count out of the tracked object and into the weak reference object, as the
strong reference count atomic needs to outlife the object itself.

Rust's Arc Weak::upgrade implementation:
d98d2f57d9/library/alloc/src/sync.rs (L1806-L1837)

Differential Revision: https://phabricator.services.mozilla.com/D102245
2021-02-03 16:16:44 +00:00
Jan de Mooij 8a7633e993 Bug 1687441 part 7 - Add NumberEqualsInt64 and NumberIsInt64 to MFBT. r=sg
Tests based on the Int32 tests, with changes/tests for very large/small values.

Differential Revision: https://phabricator.services.mozilla.com/D102724
2021-01-27 15:52:29 +00:00
Jon Coppeard 692d8936cd Bug 1686219 - Add BitSet::SetAll and ResetAll methods r=heycam
These set or clear every bit, taking care not to set trailing unused bits at the end of storage.

Differential Revision: https://phabricator.services.mozilla.com/D101775
2021-01-20 10:03:53 +00:00
Simon Giesecke 55236f5ccb Bug 1685679 - Add do_Init function to allow assignment to InitializedOnce variables. r=janv
Differential Revision: https://phabricator.services.mozilla.com/D101143
2021-01-15 11:23:41 +00:00
Kartik Gautam 7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
Cosmin Sabou 2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam 775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00
Alexis Beingessner 70c9b7ef2c Bug 1681546 - rename MOZ_ATOMIC_BITFIELDS methods to Load/Store. r=valentin,necko-reviewers
I was running into issues where these names would conflict with the type's own Get/Set methods
and these names have the added benefit of indicating a bit more that atomic stuff is going on.

Differential Revision: https://phabricator.services.mozilla.com/D99268
2020-12-09 18:14:55 +00:00