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

2223 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell 82ee49b019 Bug 1717778 - Upgrade some LinkedList asserts to RELEASE_ASSERT, r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D118719
2021-06-25 16:53:39 +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 10e86924f0 Bug 1706374 - Part 14: Track the absolute offset on iterators, r=glandium
This should improve the performance of large calls to AdvanceAcrossSegments
when using a very large BufferList, as we no longer need to iterate over each
element to find the destination when the call is closer to the end.

This will be used most frequently with the new footer code to seek to the end
of an IPC message to read out the footer.

Differential Revision: https://phabricator.services.mozilla.com/D116667
2021-06-22 18:17:23 +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 96dd5437ae Bug 1706374 - Part 14: Track the absolute offset on iterators, r=glandium
This should improve the performance of large calls to AdvanceAcrossSegments
when using a very large BufferList, as we no longer need to iterate over each
element to find the destination when the call is closer to the end.

This will be used most frequently with the new footer code to seek to the end
of an IPC message to read out the footer.

Differential Revision: https://phabricator.services.mozilla.com/D116667
2021-06-21 21:53:12 +00: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
Jan Varga c06f56c861 Bug 1709352 - Allow QMResult errors to use existing stack id and to increase the frame id during error propagation; r=dom-storage-reviewers,asuth,glandium
Differential Revision: https://phabricator.services.mozilla.com/D114243
2021-05-25 07:28:20 +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
Andi-Bogdan Postelnicu eab549fd19 Bug 1519636 - Initial reformat of C/C++ code with clang-format version 12.0.0. r=sylvestre
clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D114211
2021-05-10 07:15:07 +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
Jan de Mooij dca62ba9ee Bug 1706900 part 6 - Replace ShapeTable's custom hash table with a HashSet. r=jonco
This is much simpler and lets us tidy up the addProperty code more. It also makes
it easier to change ShapeTable for property maps in the future.

Lookup performance and memory usage appear to be similar for the two versions,
probably because ShapeTable used the same double-hashing algorithm and because
we can purge most ShapeTables on GC.

Differential Revision: https://phabricator.services.mozilla.com/D113089
2021-04-26 11:00:06 +00:00
Chris Fallin c0d9956b61 Bug 1701885 part 6 - Fix signals for WASI. r=jandem,wingo
WASI lacks of the signals support yet, so this patch stubs out
uses of signals for WASI.

Differential Revision: https://phabricator.services.mozilla.com/D110216
2021-04-20 05:15:28 +00:00
Dmitry Bezhetskov 3cc53df2c0 Bug 1701879 part 5 - Add stub atomics implementation for WASI. r=wingo,glandium
WASI lacks of the <atomic> support yet, so this patch is adding stub
implementation of atomics for WASI.

Differential Revision: https://phabricator.services.mozilla.com/D110215
2021-04-20 05:15:28 +00:00
Mike Hommey 6a41d8d7ad Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-16 04:06:02 +00:00
Butkovits Atila 8255e3083f Backed out changeset 5c6b15fcea71 (bug 1515229) for causing GTest failures. CLOSED TREE 2021-04-15 13:37:29 +03:00
Mike Hommey 2eacd46d46 Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-14 22:31:36 +00:00
Emilio Cobos Álvarez 80439edf68 Bug 1699844 - Add an escape hatch for the refcounted inside lambda checker. r=andi
Allow using the MOZ_KnownLive function to get around it.

Use case is the following: I have an std::function member variable, and I want
that member to be able to capture `this`.

Using a strong reference creates a cycle and thus would leak. I know `this` to
always outlive the member, so it is fine to use a weak capture there.

Differential Revision: https://phabricator.services.mozilla.com/D111850
2021-04-14 19:12:02 +00:00
smolnar 22c6eb14ba Backed out changeset f7b0cdc3aeb0 (bug 1515229) for causing xpc failures in test_feature_stackwalking. CLOSED TREE 2021-04-14 12:25:37 +03:00
Mike Hommey 133396cb94 Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-14 04:47:09 +00:00
Chris Fallin 605271bd29 Bug 1701620 part 4 - Fix memory support for WASI. r=jandem,sfink
WASI lacks of support many memory stuff like mmap, memory protections and etc, but
it has malloc so we can use it instead. Also, here we are stubbing out all
uses of the missing WASI memory functionality.

Differential Revision: https://phabricator.services.mozilla.com/D110075
2021-04-13 08:25:10 +00:00
Csoregi Natalia 91bd333c25 Backed out changeset f48cb748519b (bug 1701620) for bustage on Memory.cpp. CLOSED TREE 2021-04-13 10:09:41 +03:00
Chris Fallin 4e5ae46c03 Bug 1701620 part 4 - Fix memory support for WASI. r=jandem,sfink
WASI lacks of support many memory stuff like mmap, memory protections and etc, but
it has malloc so we can use it instead. Also, here we are stubbing out all
uses of the missing WASI memory functionality.

Differential Revision: https://phabricator.services.mozilla.com/D110075
2021-04-13 06:50:13 +00:00
Chris Fallin f062cdc9ba Bug 1701613 part 3 - Add stub thread implementation for WASI. r=jandem,wingo
WASI lacks thread support so the stub implementation for threads has been added.

Differential Revision: https://phabricator.services.mozilla.com/D110073
2021-04-08 08:02:16 +00:00
Emilio Cobos Álvarez 0b9fa22976 Bug 1701942 - Use bitwise equality for font variation value comparisons. r=jfkthame
Just like we do for font sizes / size-adjust in gfxFontStyle.

Differential Revision: https://phabricator.services.mozilla.com/D110519
2021-04-02 12:37:23 +00:00
Simon Giesecke f1f098cdaa Bug 1700336 - Use MaybeStorageBase in Maybe. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109487
2021-03-24 13:21:31 +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
Mike Hommey 4d8e18962b Bug 1699375 - Move WalkTheStack to mozglue. r=nika
A long standing issue is that MOZ_ASSERT and related don't print stack
traces in debug builds when they're directly or indirectly emitted from
non-libxul code. Moving WalkTheStack to mozglue alleviates the problem.

It's also not printing stack traces when emitted from C code (and for
some C third party libraries, we do redirect assert to MOZ_ASSERT),
which we solve by making the corresponding API available without C++
(which WalkTheStack being a static method of the nsTraceRefCnt class
didn't allow, or the use of a closure on Android).

This requires some adjustements to headers that indirectly assume that
Assertions.h includes ErrorList.h through nsError.h through nscore.h
through nsTraceRefcnt.h.

We also remove TestStackCrawl.cpp because it hasn't been built since
bug 158528, 19 years ago.

Differential Revision: https://phabricator.services.mozilla.com/D108913
2021-03-22 21:25:30 +00:00
Chris Peterson 7cba58e66d Bug 1571631 - Remove MOZ_MUST_USE definition. r=sg
Depends on D108345

Differential Revision: https://phabricator.services.mozilla.com/D108346
2021-03-17 03:01:21 +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
Kagami Sascha Rosylight a2323b59a0 Bug 1691515 - Add MOZ_KNOWN_LIVE member annotation r=andi
Differential Revision: https://phabricator.services.mozilla.com/D107321
2021-03-05 23:23:03 +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