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

2535 Коммитов

Автор SHA1 Сообщение Дата
Yannis Juglaret b24022bb02 Bug 1777960 - Patch msctf.dll to prevent a crash with ZoneAlarm Anti-Keylogger. r=gstoll,win-reviewers
Starting with Windows 11 22H2, Microsoft has made internal changes in
msctf.dll. The TF_Notify function, also known as CtfImmNotify from
imm32.dll, uses a new convention for its third argument. These changes
are incompatible with current versions of ZoneAlarm Anti-Keylogger,
resulting in crashes in our main process.

This patch converts messages forwarded by ZoneAlarm Anti-Keylogger to
the new convention. If we detect the product and an incompatible version
of msctf.dll, then we hook TF_Notify and detect any message using the
old convention, and convert it to the new convention.

Differential Revision: https://phabricator.services.mozilla.com/D189518
2023-10-03 15:24:47 +00:00
Jan Varga c458754592 Bug 1855134 - Move existing MOZ_TRY macros to a dedicated header file; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D189226
2023-09-28 20:46:07 +00:00
Nika Layzell 9411a9ed15 Bug 1851045 - Part 4: Add a NeverDestroyed helper type to MFBT for static local members, r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D189248
2023-09-27 19:14:16 +00:00
Mike Hommey 194571f479 Bug 1854305 - Don't enable thread safety annotations before clang 11. r=nika
Arbitrary capability names weren't allowed until clang 11, and while we
could probably make things somehow work with earlier versions of clang,
it's not that interesting, as long as we keep the thread safety analysis
running with newer versions of clang on our CI (which we obviously do).

Differential Revision: https://phabricator.services.mozilla.com/D188791
2023-09-21 20:42:33 +00:00
Masatoshi Kimura 84f3eeec16 Bug 1844908 - Remove unused Windows version check functions. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D184309
2023-08-22 19:11:41 +00:00
Emilio Cobos Álvarez 9b5ea61bed Bug 1849386 - Use consistent pointer hashing. r=nika,xpcom-reviewers
* DefaultHasher<T*> used HashGeneric<size_t>
 * nsPtrHashKey<T> used HashGeneric<T*>
 * nsRefPtrHashKey<T> used NS_PTR_TO_UINT32 >> 2

Make sure to always use HashGeneric<T*> for these.

Remove unused / redundant hash keys.

Differential Revision: https://phabricator.services.mozilla.com/D186553
2023-08-18 22:35:40 +00:00
Steve Fink 35da906445 Bug 1838827 - HashTable::reserve() should always report an error on failure r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D185191
2023-08-03 19:16:02 +00:00
Mike Hommey 4a05ff7242 Bug 1844484 - Override the symbol used by compilers in vtables for pure virtual methods. r=firefox-build-system-reviewers,ahochheiden
In bug 1839743, we made the build system prefer packed relative
relocations to elfhack when both the system libc and linker support
them. Unfortunately, while that covers most of the benefits from
elfhack, it doesn't cover bug 651892.

To cover it, we make every C++ executable contain its own copy of
the symbol, so that all relocations related to it become relative.

And because this is actually (slightly) beneficial on macos, and because
it's also an advantage to have our own abort called rather than the
system's, we apply the same to all platforms.

Differential Revision: https://phabricator.services.mozilla.com/D184068
2023-08-02 06:12:51 +00:00
Noemi Erli 72a3108e1e Backed out changeset a2017655dd34 (bug 1844484) for causing failures in test_crash_purevirtual.js 2023-08-01 15:09:51 +03:00
Mike Hommey cf3f361146 Bug 1844484 - Override the symbol used by compilers in vtables for pure virtual methods. r=firefox-build-system-reviewers,ahochheiden
In bug 1839743, we made the build system prefer packed relative
relocations to elfhack when both the system libc and linker support
them. Unfortunately, while that covers most of the benefits from
elfhack, it doesn't cover bug 651892.

To cover it, we make every C++ executable contain its own copy of
the symbol, so that all relocations related to it become relative.

And because this is actually (slightly) beneficial on macos, and because
it's also an advantage to have our own abort called rather than the
system's, we apply the same to all platforms.

Differential Revision: https://phabricator.services.mozilla.com/D184068
2023-08-01 05:32:00 +00:00
Ryan VanderMeulen ded3dfb71d Bug 1845018 - Update xxHash to version 0.8.2. r=dthayer
Differential Revision: https://phabricator.services.mozilla.com/D184325
2023-07-26 16:21:11 +00:00
serge-sans-paille 4cb35b98e0 Bug 1844554 - Vendor double-conversion using `mach vendor` r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D184091
2023-07-21 08:12:09 +00:00
Nika Layzell effc2ca999 Bug 1843568 - Part 3: Annotate `nsIEventTarget` as rust_sync, r=xpcom-reviewers,barret
All event targets should be threadsafe and implemented in C++, and so should be
able to be used in `Sync` types in Rust code.

This also required annotating all interfaces deriving from `nsIEventTarget`, as
well as adding some associated constants to specific types to indicate to the
static assertion that they have threadsafe reference counts.

Differential Revision: https://phabricator.services.mozilla.com/D183592
2023-07-20 17:39:03 +00:00
Noemi Erli ec441901f7 Backed out 5 changesets (bug 1843568) for causing xpc failures in test_extension_permissions_migration.js CLOSED TREE
Backed out changeset a4cb1e2b9e3d (bug 1843568)
Backed out changeset 26047645c009 (bug 1843568)
Backed out changeset 50d6b858ee6e (bug 1843568)
Backed out changeset 3597df96ba38 (bug 1843568)
Backed out changeset 8faeb75f1161 (bug 1843568)
2023-07-19 22:54:13 +03:00
Nika Layzell 46c26f2961 Bug 1843568 - Part 3: Annotate `nsIEventTarget` as rust_sync, r=xpcom-reviewers,barret
All event targets should be threadsafe and implemented in C++, and so should be
able to be used in `Sync` types in Rust code.

This also required annotating all interfaces deriving from `nsIEventTarget`, as
well as adding some associated constants to specific types to indicate to the
static assertion that they have threadsafe reference counts.

Differential Revision: https://phabricator.services.mozilla.com/D183592
2023-07-19 18:03:45 +00:00
Markus Stange d65e61e97a Bug 1843181 - Make EqualRange return a std::pair. r=sergesanspaille
mozilla::CompactPair doesn't seem appropriate because its base class optimization doesn't apply.

Differential Revision: https://phabricator.services.mozilla.com/D178843
2023-07-14 21:51:27 +00:00
Tyson Smith afac244b61 Bug 1824768 - Add TSan suppressions for external libs. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D173791
2023-07-07 10:12:54 +00:00
Paul Adenot 348493c16c Bug 1838828 - Fix obsolete comment in Assertions.h: MOZ_RELEASE_ASSERT is no-op only in late beta and release. r=chunmin
This is controlled by this:
https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/moz.configure#125-134

Differential Revision: https://phabricator.services.mozilla.com/D182916
2023-07-07 00:51:27 +00:00
André Bargull 50d9348a9e Bug 1841314 - Part 3: Prefer JS::NewArrayBufferWithContents with UniquePtr. r=sfink,saschanaz
Replace the existing callers of `JS::NewArrayBufferWithContents` with the new
`UniquePtr` alternative.

Three callers to the old `JS::NewArrayBufferWithContents` function were left
unchanged:
- `mozilla::dom::FileReader::OnLoadEndArrayBuffer()` and
  `mozilla::dom::ArrayBufferBuilder::TakeArrayBuffer()` both store the data
  buffer as members and therefore have a more complicated lifetime.
- `JSStructuredCloneReader::readTransferMap()` because it's not clear if the
  data can be free'ed when `ArrayBuffectObject` allocation fails.

Differential Revision: https://phabricator.services.mozilla.com/D182588
2023-07-06 20:50:59 +00:00
Sandor Molnar a6c121377b Backed out 7 changesets (bug 1841314) for causing hazard failures. CLOSED TREE
Backed out changeset 82a53d6ea95a (bug 1841314)
Backed out changeset 524607b471a2 (bug 1841314)
Backed out changeset ce128e10bddb (bug 1841314)
Backed out changeset cdae4fbbdaff (bug 1841314)
Backed out changeset f1035b6c08fe (bug 1841314)
Backed out changeset 5897ad8ef181 (bug 1841314)
Backed out changeset 09618a767080 (bug 1841314)
2023-07-06 16:59:47 +03:00
André Bargull 412b9d7c45 Bug 1841314 - Part 3: Prefer JS::NewArrayBufferWithContents with UniquePtr. r=sfink,saschanaz
Replace the existing callers of `JS::NewArrayBufferWithContents` with the new
`UniquePtr` alternative.

Three callers to the old `JS::NewArrayBufferWithContents` function were left
unchanged:
- `mozilla::dom::FileReader::OnLoadEndArrayBuffer()` and
  `mozilla::dom::ArrayBufferBuilder::TakeArrayBuffer()` both store the data
  buffer as members and therefore have a more complicated lifetime.
- `JSStructuredCloneReader::readTransferMap()` because it's not clear if the
  data can be free'ed when `ArrayBuffectObject` allocation fails.

Differential Revision: https://phabricator.services.mozilla.com/D182588
2023-07-06 12:26:53 +00:00
Cristina Horotan f77c6f3e48 Backed out 7 changesets (bug 1841314) for causing hazard failures at js.cpp CLOSED TREE
Backed out changeset becc2fa2c186 (bug 1841314)
Backed out changeset e5b723317177 (bug 1841314)
Backed out changeset 61ae850b25e5 (bug 1841314)
Backed out changeset 9ff320c779b8 (bug 1841314)
Backed out changeset debf1172f794 (bug 1841314)
Backed out changeset 8ac4fa317006 (bug 1841314)
Backed out changeset eccacbb3b620 (bug 1841314)
2023-07-06 15:11:47 +03:00
André Bargull 0c386d5c4b Bug 1841314 - Part 3: Prefer JS::NewArrayBufferWithContents with UniquePtr. r=sfink,saschanaz
Replace the existing callers of `JS::NewArrayBufferWithContents` with the new
`UniquePtr` alternative.

Three callers to the old `JS::NewArrayBufferWithContents` function were left
unchanged:
- `mozilla::dom::FileReader::OnLoadEndArrayBuffer()` and
  `mozilla::dom::ArrayBufferBuilder::TakeArrayBuffer()` both store the data
  buffer as members and therefore have a more complicated lifetime.
- `JSStructuredCloneReader::readTransferMap()` because it's not clear if the
  data can be free'ed when `ArrayBuffectObject` allocation fails.

Differential Revision: https://phabricator.services.mozilla.com/D182588
2023-07-06 11:41:17 +00:00
Jesse Schwartzentruber 51d7504cd1 Bug 1766058 - Avoid mixing log output. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D179725
2023-06-19 20:44:29 +00:00
Kelsey Gilbert 0fb34553d5 Bug 1812353 - Update GPUSupportedLimits in webgpu.webidl. r=webgpu-reviewers,webidl,saschanaz,jimb,emilio,smaug
* Add validation for requested features and devices for
adapter.requestDevice().
* Promote webgl's AutoAssertCast to mfbt/Casting.h/LazyAssertedCast.

Differential Revision: https://phabricator.services.mozilla.com/D177110
2023-06-12 21:10:11 +00:00
Stanca Serban 7f8803cf62 Backed out changeset 8352bc23343d (bug 1812353) for causing build bustages in Adapter.cpp. CLOSED TREE 2023-06-09 23:42:09 +03:00
Kelsey Gilbert 2e186b9e3a Bug 1812353 - Update GPUSupportedLimits in webgpu.webidl. r=webgpu-reviewers,webidl,saschanaz,jimb,emilio,smaug
* Add validation for requested features and devices for
adapter.requestDevice().
* Promote webgl's AutoAssertCast to mfbt/Casting.h/LazyAssertedCast.

Differential Revision: https://phabricator.services.mozilla.com/D177110
2023-06-09 19:52:39 +00:00
Nicolas B. Pierron 7843dc698e Bug 1836964 - Add mozilla::MakeCompilerAssumeUnreachableFakeValue to abort if ever used. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D180089
2023-06-06 15:44:59 +00:00
Gabriele Svelto 0a57af7f2a Bug 1681846 - Ensure MOZ_CRASH() stores the reason in crash reports on 32-bit ARM/Android builds r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D179196
2023-05-31 06:58:36 +00:00
Chris Peterson 32b7b4e8da Bug 1791961 - mfbt: constify some operators to fix C++20 -Wambiguous-reversed-operator warnings. r=glandium
clang is warning that C++20 expects comparison operators to be commutative: `a == b` and `b == a` should resolve to the same comparison operator function. Warnings about the comparison of const and non-const objects can be fixed by making the comparison operator function const.

mfbt/tests/TestDoublyLinkedList.cpp:158:36 [-Wambiguous-reversed-operator] ISO C++20 considers use of overloaded operator '==' (with operand types 'SomeClass' and 'SomeClass') to be ambiguous despite there being a unique best viable function
mfbt/tests/TestDoublyLinkedList.cpp:159:38 [-Wambiguous-reversed-operator] ISO C++20 considers use of overloaded operator '==' (with operand types 'SomeClass' and 'SomeClass') to be ambiguous despite there being a unique best viable function

Depends on D179022

Differential Revision: https://phabricator.services.mozilla.com/D179023
2023-05-26 04:51:44 +00:00
Mike Hommey 38a3d1fae3 Bug 1834912 - Add iOS-related defines/ifdefs for IPC. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D178999
2023-05-25 02:48:33 +00:00
Paul Adenot 23ce79a819 Bug 1821362 - Replace EuclidGCD by a binary gcd algorithm using intrinsics. r=media-playback-reviewers,alwu
Perf notes:
https://lemire.me/blog/2013/12/26/fastest-way-to-compute-the-greatest-common-divisor/

Differential Revision: https://phabricator.services.mozilla.com/D173315
2023-05-24 13:18:41 +00:00
Paul Adenot 31157559f1 Bug 1821362 - Add a generic CountTrailingZeroes function that lowers to the right intrinsic based the type its called with. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173314
2023-05-24 13:18:41 +00:00
Paul Adenot b29794e7cc Bug 1830206 - Fix an overly restrictive assertion in the SPSC ringbuffer. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D177770
2023-05-24 13:11:46 +00:00
Ryan VanderMeulen 6af5555c16 Bug 1833859 - Update double-conversion to version 3.3.0. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D178437
2023-05-23 04:01:10 +00:00
Cosmin Sabou 5fd965f028 Backed out 80 changesets (bug 1821362, bug 1703812, bug 1817997) for causing media crashes as in Bug 1833890. a=backout
Backed out changeset f2113c9b661f (bug 1817997)
Backed out changeset f1ecfbba7ed2 (bug 1703812)
Backed out changeset 011cece33b0d (bug 1817997)
Backed out changeset 4b42659090f3 (bug 1817997)
Backed out changeset 2d92f903dd66 (bug 1817997)
Backed out changeset 0ef13d357ee3 (bug 1817997)
Backed out changeset 7353f869efd2 (bug 1703812)
Backed out changeset 14b061d0f595 (bug 1817997)
Backed out changeset d29bc29397c8 (bug 1703812)
Backed out changeset 54c3294f0839 (bug 1817997)
Backed out changeset b9f2e1155bd7 (bug 1817997)
Backed out changeset d5d5d390dcbf (bug 1817997)
Backed out changeset 8fca27bd0f6b (bug 1817997)
Backed out changeset 670c599a3b99 (bug 1817997)
Backed out changeset deea3077f762 (bug 1817997)
Backed out changeset 25ecea0f3d49 (bug 1817997)
Backed out changeset 35ab3ed5e3fc (bug 1817997)
Backed out changeset f516a428ba32 (bug 1817997)
Backed out changeset e589b4d30995 (bug 1817997)
Backed out changeset d096b9cc905d (bug 1817997)
Backed out changeset 2952a6fa06e5 (bug 1817997)
Backed out changeset c1ac4c31ad9a (bug 1817997)
Backed out changeset 04c60cd83c5f (bug 1821362)
Backed out changeset 6dd80575e551 (bug 1821362)
Backed out changeset b86b569ecd46 (bug 1817997)
Backed out changeset 412e0a9ec4e8 (bug 1817997)
Backed out changeset 8e0dcf163138 (bug 1817997)
Backed out changeset 7af506896930 (bug 1817997)
Backed out changeset 29f7cd2b341c (bug 1817997)
Backed out changeset 7f64e65d9497 (bug 1817997)
Backed out changeset 89c241451a32 (bug 1817997)
Backed out changeset 66e4a26e1ebe (bug 1817997)
Backed out changeset ea1aebd4e245 (bug 1817997)
Backed out changeset 2d88a5915db9 (bug 1817997)
Backed out changeset 697ec1928f9c (bug 1817997)
Backed out changeset 41c0bd1133c5 (bug 1817997)
Backed out changeset b20cc750c020 (bug 1817997)
Backed out changeset dc5fd84a3a4c (bug 1703812)
Backed out changeset efa6d130d4eb (bug 1703812)
Backed out changeset 20d9b7cf0ddc (bug 1703812)
Backed out changeset e77c61e8fad2 (bug 1703812)
Backed out changeset 582d5c680e5a (bug 1703812)
Backed out changeset 96c9aacc6811 (bug 1703812)
Backed out changeset 56ec4a57a6a6 (bug 1703812)
Backed out changeset 8f96c8811675 (bug 1703812)
Backed out changeset a79a2f1b2b51 (bug 1703812)
Backed out changeset 07eb8b2c5b9f (bug 1703812)
Backed out changeset bae2b2fb9759 (bug 1703812)
Backed out changeset 38b0416538f3 (bug 1703812)
Backed out changeset b27b54c95cf2 (bug 1703812)
Backed out changeset cab00065d83d (bug 1703812)
Backed out changeset ab44727b2e1a (bug 1703812)
Backed out changeset b7fdcb494670 (bug 1703812)
Backed out changeset 73db43d49c6d (bug 1703812)
Backed out changeset ce754dbfb862 (bug 1703812)
Backed out changeset d694726a3ee6 (bug 1703812)
Backed out changeset 6acede55acbb (bug 1703812)
Backed out changeset 86e7d4784a20 (bug 1703812)
Backed out changeset 6b2e055d9314 (bug 1703812)
Backed out changeset b08695e5728a (bug 1703812)
Backed out changeset 3b8a0081fd10 (bug 1703812)
Backed out changeset 3a163596f982 (bug 1703812)
Backed out changeset 5be1d4b282ab (bug 1703812)
Backed out changeset 1ce012d7509e (bug 1703812)
Backed out changeset ee2fab5881c7 (bug 1703812)
Backed out changeset 62941a522893 (bug 1703812)
Backed out changeset d4f11dc33eed (bug 1703812)
Backed out changeset 781bb4c3cc02 (bug 1703812)
Backed out changeset f070e0de0566 (bug 1703812)
Backed out changeset 9f65c67ba2a6 (bug 1703812)
Backed out changeset 1e76eecb85e2 (bug 1703812)
Backed out changeset 953432408a83 (bug 1703812)
Backed out changeset fd1dc92d3911 (bug 1703812)
Backed out changeset 34d56948c6b6 (bug 1703812)
Backed out changeset 2ba7ca61ecc3 (bug 1703812)
Backed out changeset 545253c469e6 (bug 1703812)
Backed out changeset fb4a61ab1300 (bug 1703812)
Backed out changeset bf07b3cfd3d5 (bug 1703812)
Backed out changeset eaff51e7754b (bug 1703812)
Backed out changeset f5c485c41d13 (bug 1703812)
2023-05-19 14:49:57 +03:00
Paul Adenot 281091bd3d Bug 1821362 - Replace EuclidGCD by a binary gcd algorithm using intrinsics. r=media-playback-reviewers,alwu
Perf notes:
https://lemire.me/blog/2013/12/26/fastest-way-to-compute-the-greatest-common-divisor/

Differential Revision: https://phabricator.services.mozilla.com/D173315
2023-05-17 15:47:05 +00:00
Paul Adenot 63452a9038 Bug 1821362 - Add a generic CountTrailingZeroes function that lowers to the right intrinsic based the type its called with. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173314
2023-05-17 15:47:05 +00:00
Yannis Juglaret 6929e31dcb Bug 1816953 - Stop hooking BCryptGenRandom. r=cmartin,handyman
In bug 1788004, we started hooking BCryptGenRandom on the machines where
calling it for the first time fails. This was useful to mitigate Rust
panics linked to RNG function failures in the Rust stdlib and
in the getrandom crate. Both now have proper fallbacks again, so we can
remove our hook.

Differential Revision: https://phabricator.services.mozilla.com/D174966
2023-05-03 13:40:36 +00:00
Tyson Smith dbbc86792f Bug 1825171 - Wayland TSan suppressions. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D174937
2023-04-27 07:43:36 +00:00
Narcis Beleuzu f07e83e456 Backed out changeset 6da3251ba597 (bug 1825171) for failures on test_shutdown_pings_succeed.py . CLOSED TREE 2023-04-25 04:14:01 +03:00
Tyson Smith f2f8898b45 Bug 1825171 - Wayland TSan suppressions. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D174937
2023-04-24 18:13:28 +00:00
Ryan VanderMeulen c7ce7b343c Bug 1829425 - Rename the ASAN/TSAN blacklist macros. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D176201
2023-04-24 12:47:00 +00:00
Dana Keeler f0596227b1 Bug 1811645 - avoid an American English colloquialism meaning "nonsense" r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D175802
2023-04-20 22:24:00 +00:00
Emilio Cobos Álvarez b8f531e854 Bug 1828784 - Work around VS 2019+ SDK issue. r=glandium
This is enough to prevent the undesired instantiation.

Differential Revision: https://phabricator.services.mozilla.com/D175920
2023-04-19 22:51:46 +00:00
Tooru Fujisawa 38d4d2116e Bug 1828560 - Part 2: Rename BitBloomFilter::mCounters to mBits. r=dpalmeiro
Depends on D175722

Differential Revision: https://phabricator.services.mozilla.com/D175723
2023-04-19 05:25:09 +00:00
Tooru Fujisawa ba0f481b36 Bug 1828560 - Part 1: Use correct kKeyMask in BitBloomFilter. r=dpalmeiro
Differential Revision: https://phabricator.services.mozilla.com/D175722
2023-04-19 05:25:08 +00:00
Andi-Bogdan Postelnicu 3d035ca8b1 Bug 1679492 - Remove parts that are unused from mfbt/TemplateLib. r=sergesanspaille
Some implementations from TemplateLib are easily changeable with std functionality.
mozilla::tl::And has been removed and replaced with std::conjuction

Differential Revision: https://phabricator.services.mozilla.com/D175762
2023-04-18 12:42:13 +00:00
serge-sans-paille 84f403224a Bug 1826756 - Make mfbt/tests/gtest buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D174881
2023-04-18 09:42:14 +00:00
Andi-Bogdan Postelnicu 79e171fd9f Bug 1277372 - Remove unused "mozilla/TypeTraits.h" r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D174129
2023-04-17 13:50:11 +00:00
Andi-Bogdan Postelnicu bf2bb59367 Bug 1277372 - Move away from "mozilla/TypeTraits.h". r=geckoview-reviewers,sergesanspaille,m_kato
std::is_pod has been deprecated in C++20, see https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0767r1.html.
This is equivalent with std::is_trivial_v && std::is_standard_layout.

Differential Revision: https://phabricator.services.mozilla.com/D174128
2023-04-17 13:50:11 +00:00
Stanca Serban cefd926755 Backed out 9 changesets (bug 1826760, bug 1826758, bug 1826752, bug 1826756, bug 1826759, bug 1826761, bug 1826757, bug 1826753, bug 1826754) for causing bp-hybrid bustages in ClearKeyDecryptionManager.cpp.
CLOSED TREE

Backed out changeset 210012222277 (bug 1826761)
Backed out changeset e364bb149efa (bug 1826760)
Backed out changeset e456e2f9966c (bug 1826759)
Backed out changeset 2b6ff545f4a3 (bug 1826758)
Backed out changeset 95fe1de8ba00 (bug 1826757)
Backed out changeset f8af52d7f2a1 (bug 1826756)
Backed out changeset 2646e773f098 (bug 1826754)
Backed out changeset 58d5d74b1835 (bug 1826753)
Backed out changeset 8567e6595acc (bug 1826752)
2023-04-17 13:52:39 +03:00
serge-sans-paille 26061f891d Bug 1826756 - Make mfbt/tests/gtest buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D174881
2023-04-17 10:11:56 +00:00
Sylvestre Ledru fd7fdbccad no bug - mfbt: use the C++ usual declaration r=andi DONTBUILD
Depends on D174439

Differential Revision: https://phabricator.services.mozilla.com/D174440
2023-04-12 09:55:04 +00:00
serge-sans-paille ba6b4ed3d1 Bug 1826077 - Make mfbt buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D174463
2023-04-03 20:39:16 +00:00
Andi-Bogdan Postelnicu 02db5a8d8f Bug 1276351 - remove unused mozilla::tuple. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173299
2023-03-27 07:20:29 +00:00
Andi-Bogdan Postelnicu 4efa1bd0ba Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-27 07:20:25 +00:00
Sandor Molnar 9db345d4c1 Backed out 2 changesets (bug 1276351) for causing build bustage in image/ClippedImage.cp CLOSED TREE
Backed out changeset e84598eb82c1 (bug 1276351)
Backed out changeset e940b0554484 (bug 1276351)
2023-03-25 14:16:43 +02:00
Andi-Bogdan Postelnicu 770e8dca42 Bug 1276351 - remove unused mozilla::tuple. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173299
2023-03-25 06:58:52 +00:00
Andi-Bogdan Postelnicu 447f1e3358 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-25 06:58:52 +00:00
Iulian Moraru 6d40eee997 Backed out 2 changesets (bug 1276351) for causing multiple failures.
Backed out changeset eeaf4f1e06af (bug 1276351)
Backed out changeset d44cb5704342 (bug 1276351)
2023-03-25 00:08:24 +02:00
Andi-Bogdan Postelnicu 90401e3fba Bug 1276351 - remove unused mozilla::tuple. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173299
2023-03-24 18:55:40 +00:00
Andi-Bogdan Postelnicu a1b827b503 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-24 18:55:39 +00:00
Andi-Bogdan Postelnicu 3fd4d5f938 Bug 1660405 - Transform mozilla::IsNegative to use std implementation. r=glandium
Since we cannot move away from mozilla::IsNegative to std::signbit because the
first one doesn't accept a NaN we should transform our function to use std implementation.

Differential Revision: https://phabricator.services.mozilla.com/D173111
2023-03-22 11:35:36 +00:00
Andi-Bogdan Postelnicu e6c033fea4 Bug 1660405 - remove unused mozilla::IsFinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173050
2023-03-22 11:35:35 +00:00
Andi-Bogdan Postelnicu c4666f21f3 Bug 1660405 - remove unused mozilla::IsInfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173049
2023-03-22 11:35:35 +00:00
Andi-Bogdan Postelnicu 847a0f9d04 Bug 1660405 - remove unused mozilla::IsNaN. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173048
2023-03-22 11:35:34 +00:00
Andi-Bogdan Postelnicu fa5d4cca1f Bug 1660405 - Move away from mozilla::IsFinite in favor of std::isfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173036
2023-03-22 11:35:33 +00:00
Andi-Bogdan Postelnicu 10f49d4180 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 11:35:33 +00:00
Jon Coppeard f3c4ef32b2 Bug 1821659 - Part 2: Return hash code from ensureHash too r=sfink
Similarly |ensureHash| should return the hash code it creates so we don't have
to look it up immediately.

Differential Revision: https://phabricator.services.mozilla.com/D173123
2023-03-22 09:53:17 +00:00
Jon Coppeard 3c7221a13c Bug 1821659 - Part 1: Allow fallible hashing to return the hash code with maybeGetHash r=sfink
This is used where the hash table operation can fail early if we know there's
never been a hash code created for a lookup. If there has been a hash code
created, it's more efficient to return it though as otherwise we will always
query it straight away.

Therefore this renames |hasHash| to |maybeGetHash| and adds an output
parameter.

Differential Revision: https://phabricator.services.mozilla.com/D173122
2023-03-22 09:53:16 +00:00
Stanca Serban e31a178029 Backed out 7 changesets (bug 1660405) for causing bustages on Linux x64 opt. CLOSED TREE
Backed out changeset ad1a5f59214f (bug 1660405)
Backed out changeset a39e95f0aafe (bug 1660405)
Backed out changeset 48629ee0d70d (bug 1660405)
Backed out changeset 8419b99aab60 (bug 1660405)
Backed out changeset 535cc12c8bed (bug 1660405)
Backed out changeset e27052da4927 (bug 1660405)
Backed out changeset 11b0f9cf8091 (bug 1660405)
2023-03-22 13:05:53 +02:00
Andi-Bogdan Postelnicu 8fed9936fb Bug 1660405 - Transform mozilla::IsNegative to use std implementation. r=glandium
Since we cannot move away from mozilla::IsNegative to std::signbit because the
first one doesn't accept a NaN we should transform our function to use std implementation.

Differential Revision: https://phabricator.services.mozilla.com/D173111
2023-03-22 09:27:59 +00:00
Andi-Bogdan Postelnicu 76fde7399f Bug 1660405 - remove unused mozilla::IsFinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173050
2023-03-22 09:27:59 +00:00
Andi-Bogdan Postelnicu ffa4c72717 Bug 1660405 - remove unused mozilla::IsInfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173049
2023-03-22 09:27:58 +00:00
Andi-Bogdan Postelnicu c2d0ffbaf3 Bug 1660405 - remove unused mozilla::IsNaN. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173048
2023-03-22 09:27:58 +00:00
Andi-Bogdan Postelnicu 0b692b5a96 Bug 1660405 - Move away from mozilla::IsFinite in favor of std::isfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173036
2023-03-22 09:27:57 +00:00
Andi-Bogdan Postelnicu a5d28acdd6 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 09:27:56 +00:00
Nika Layzell 10582b6528 Bug 1607634 - Part 1: Improve the ergonomics of using NotNull with RefPtr and nsCOMPtr, r=glandium
This does a few minor improvements:
1. Adds implicit conversions from NotNull to a raw pointer type if supported by
   the underlying type, to make it so NotNull<RefPtr<T>> acts more like
   RefPtr<T> in some situations.
2. Adds explicit conversion constructors and assignment operators for RefPtr
   and nsCOMPtr from NotNull, avoiding conversion ambiguity added by the first
   change.
3. Disable conversion constructors on NotNull with SFINAE if they should not be
   available, meaning that type traits like std::is_convertible_v interact with
   it properly.

Differential Revision: https://phabricator.services.mozilla.com/D168883
2023-03-20 15:40:35 +00:00
Jason Kratzer ab6d98f4db Bug 1822605: Add ThreadSanitizer suppression for race in libvulkan_lvp.so r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D172819
2023-03-16 20:12:03 +00:00
Iulian Moraru 801dae8f2c Backed out 14 changesets (bug 1607634, bug 1814683, bug 1815177, bug 1814686) for causing build bustages on MaybeStorageBase. CLOSED TREE
Backed out changeset ae1c0551cea5 (bug 1815177)
Backed out changeset a11cafaa1884 (bug 1814686)
Backed out changeset 621507521762 (bug 1814686)
Backed out changeset ad692c73e381 (bug 1814686)
Backed out changeset 3be031e503dc (bug 1607634)
Backed out changeset aebbaa145d2d (bug 1607634)
Backed out changeset 9aa1f346fe14 (bug 1607634)
Backed out changeset e3eb77ad55ca (bug 1607634)
Backed out changeset e60591e5d5cf (bug 1607634)
Backed out changeset 6e43042d204a (bug 1814683)
Backed out changeset 1706e88652d6 (bug 1814683)
Backed out changeset 6878a1590e91 (bug 1814683)
Backed out changeset b1c980c834d8 (bug 1814683)
Backed out changeset 94480b82d102 (bug 1814683)
2023-03-15 01:58:36 +02:00
Nika Layzell c821668d34 Bug 1607634 - Part 1: Improve the ergonomics of using NotNull with RefPtr and nsCOMPtr, r=glandium
This does a few minor improvements:
1. Adds implicit conversions from NotNull to a raw pointer type if supported by
   the underlying type, to make it so NotNull<RefPtr<T>> acts more like
   RefPtr<T> in some situations.
2. Adds explicit conversion constructors and assignment operators for RefPtr
   and nsCOMPtr from NotNull, avoiding conversion ambiguity added by the first
   change.
3. Disable conversion constructors on NotNull with SFINAE if they should not be
   available, meaning that type traits like std::is_convertible_v interact with
   it properly.

Differential Revision: https://phabricator.services.mozilla.com/D168883
2023-03-14 19:31:38 +00:00
Christian Holler (:decoder) 3b82ba8433 Bug 1821008 - Add nyx abort macro and more debug messages. r=truber,glandium
Differential Revision: https://phabricator.services.mozilla.com/D171979
2023-03-14 07:50:36 +00:00
Kelsey Gilbert 19eabfaf4b Bug 1799258 - span_iterator::difference_type s/index_type/ptrdiff/. r=bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D167473
2023-03-13 21:04:11 +00:00
Kelsey Gilbert 000ff9b4e5 Bug 1799258 - Add prereq Colorspaces stuff, including generic gamma->linear LUT inversion approximation. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D163664
2023-03-13 21:04:10 +00:00
Paul Bone 9cf01cdc21 Bug 1820685 - Improve the comment for reserve() in HashSet/HashTable r=glandium DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D171815
2023-03-08 08:09:02 +00:00
Emilio Cobos Álvarez 58dfff38db Bug 1815396 - Fix documentation of MruCache. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D171653
2023-03-06 10:43:27 +00:00
Marian-Vasile Laza 235833c608 Backed out 2 changesets (bug 1815396) for wpt failures on 2d.gradient.object.current.html. CLOSED TREE
Backed out changeset 68e805821a98 (bug 1815396)
Backed out changeset 0fb8dd16d01c (bug 1815396)
2023-03-05 22:01:05 +02:00
Emilio Cobos Álvarez 0985c30fb7 Bug 1815396 - Fix documentation of MruCache. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D171653
2023-03-05 18:40:14 +00:00
Yannis Juglaret 16873187c2 Bug 1819064 - Add a MOZ_NO_STACK_PROTECTOR modifier attribute. r=gstoll
We define a new MOZ_HAVE_NO_STACK_PROTECTOR modifier attribute. It is
mapped to __attribute__((no_stack_protector)) and specifies that a given
function should *NOT* be instrumented to detect stack buffer overflows
at runtime.

Differential Revision: https://phabricator.services.mozilla.com/D171361
2023-03-03 15:07:49 +00:00
Jason Kratzer b728f506fc Bug 1816713 - Add libvulkan to thread sanitizer suppression list r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D171136
2023-02-28 16:18:19 +00:00
Yannis Juglaret c998f74ae3 Bug 1788004 - Implement a hook-based fallback for BCryptGenRandom to mitigate Rust panics. r=cmartin
BCryptGenRandom can be broken, but the Rust stdlib and the getrandom
crate rely on it, and this is a source of crashes which are Rust
panics. This happens the most on Windows 7 after bcryptprimitives.dll
fails to load (see bug 1788004).

To mitigate these crashes, we hook BCryptGenRandom if we detect that it
is broken, and install a fallback based on RtlGenRandom. We only protect
calls that use BCRYPT_USE_SYSTEM_PREFERRED_RNG; so code that relies on
using BCryptOpenAlgorithmProvider and doesn't have its own fallback can
still fail.

We will hopefully remove this hook when the Rust stdlib and the
getrandom crate both have their own RtlGenRandom-based fallback.

Differential Revision: https://phabricator.services.mozilla.com/D170662
2023-02-27 15:00:57 +00:00
Cosmin Sabou d8ac128a8d Backed out changeset 78e7281703a2 (bug 1788004) for causing SM failures. CLOSED TREE 2023-02-24 19:13:47 +02:00
Yannis Juglaret 45cce5b7c0 Bug 1788004 - Implement a hook-based fallback for BCryptGenRandom to mitigate Rust panics. r=cmartin
BCryptGenRandom can be broken, but the Rust stdlib and the getrandom
crate rely on it, and this is a source of crashes which are Rust
panics. This happens the most on Windows 7 after bcryptprimitives.dll
fails to load (see bug 1788004).

To mitigate these crashes, we hook BCryptGenRandom if we detect that it
is broken, and install a fallback based on RtlGenRandom. We only protect
calls that use BCRYPT_USE_SYSTEM_PREFERRED_RNG; so code that relies on
using BCryptOpenAlgorithmProvider and doesn't have its own fallback can
still fail.

We will hopefully remove this hook when the Rust stdlib and the
getrandom crate both have their own RtlGenRandom-based fallback.

Differential Revision: https://phabricator.services.mozilla.com/D170662
2023-02-24 15:47:14 +00:00
Stanca Serban aaea911dc4 Backed out 9 changesets (bug 1799258) for causing multiple failures. CLOSED TREE
Backed out changeset 40351b5987a5 (bug 1799258)
Backed out changeset 87f3532bfbcd (bug 1799258)
Backed out changeset 9c1d9405e8bf (bug 1799258)
Backed out changeset 60a0351d9092 (bug 1799258)
Backed out changeset 5f911de66ec0 (bug 1799258)
Backed out changeset 294a00d1c7b7 (bug 1799258)
Backed out changeset 228200dcaf93 (bug 1799258)
Backed out changeset b25110652394 (bug 1799258)
Backed out changeset 3c3c7366cc40 (bug 1799258)
2023-02-15 12:18:44 +02:00
Kelsey Gilbert 0c259e6b9b Bug 1799258 - span_iterator::difference_type s/index_type/ptrdiff/. r=bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D167473
2023-02-15 08:29:43 +00:00
Kelsey Gilbert c68b5dd286 Bug 1799258 - Add prereq Colorspaces stuff, including generic gamma->linear LUT inversion approximation. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D163664
2023-02-15 08:29:41 +00:00
Andi-Bogdan Postelnicu d7e8a09c21 Bug 1519636 - Reformat recent changes to the Google coding style. r=glandium
Updated with clang-format version 15.0.5 (taskcluster-MKK8dHUpQkGfPLA793lizg)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D168658
2023-02-13 15:02:07 +00:00
Norisz Fay ed1015daf1 Backed out 9 changesets (bug 1799258) for causing build bustages CLOSED TREE
Backed out changeset a48db1421c6d (bug 1799258)
Backed out changeset 7707637480e7 (bug 1799258)
Backed out changeset 0141b29bf5df (bug 1799258)
Backed out changeset cd9af26bb314 (bug 1799258)
Backed out changeset 4e68a54c6410 (bug 1799258)
Backed out changeset 52afd24d2338 (bug 1799258)
Backed out changeset b4b4977857c7 (bug 1799258)
Backed out changeset 2c23929f52f2 (bug 1799258)
Backed out changeset 83744e1e372b (bug 1799258)
2023-02-07 00:36:41 +02:00
Kelsey Gilbert 847d649fd8 Bug 1799258 - span_iterator::difference_type s/index_type/ptrdiff/. r=bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D167473
2023-02-06 19:58:55 +00:00