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

2144 Коммитов

Автор SHA1 Сообщение Дата
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
Ryan VanderMeulen 691f671c7b Bug 1656894 - Update xxHash to version 0.8.0. r=dthayer
Differential Revision: https://phabricator.services.mozilla.com/D85767
2021-01-12 16:20:32 +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
Masatoshi Kimura fa4cb37973 Bug 1684110 - Stop using some 'A'-functions in mfbt/. r=dmajor
Depends on D100464

Differential Revision: https://phabricator.services.mozilla.com/D100465
2021-01-04 14:40:48 +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
Simon Giesecke 7326b3cd81 Bug 1410760 - Fix comment on NotNull<UniquePtr<T>>. r=gerald DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D100322
2020-12-22 11:11:21 +00:00
Ting-Yu Lin fd531e4c1a Bug 1683227 - Add a note to Maybe::valueOr() about a suboptimal usage. r=sg DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D100071
2020-12-21 18:32:26 +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
Simon Giesecke 8c5c02b43d Bug 1680724 - Add a utility function that converts a T* to a Maybe<T&>. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D98783
2020-12-08 17:49:22 +00:00
Chris Fronk a7c75776e8 Bug 1432988 - Add hash for pair types. r=botond
Add HashFunctions for std::pair and CompactPair to mfbt

Differential Revision: https://phabricator.services.mozilla.com/D97865
2020-12-04 21:57:03 +00:00
André Bargull 24afd99138 Bug 1679611 - Part 2: Add test for BufferList::RangeLength. r=sfink
Add tests to cover the cases when the start iterator is in different segments
and within segments at different positions.

Also assert that `mSegment <= aTarget.mSegment`, so it's more easy to see
that `aTarget` mustn't point to an earlier segment.

Depends on D98340

Differential Revision: https://phabricator.services.mozilla.com/D98462
2020-12-02 18:48:22 +00:00
André Bargull d0ba81b597 Bug 1679611 - Part 1: Use next segment as the starting point. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D98340
2020-12-02 17:23:07 +00:00
Gerald Squelart 0e7e45ed66 Bug 1500811 - Variant::as()&&, match()&& - r=sg
`as<...>()` on an rvalue variant returns the contained value as rvalue-reference.
`match()` on an rvalue variant forwards the contained value as rvalue-reference.
So now the contained values can be efficiently moved-from.

There are also equivalents for `const&&`, which should be rare.

For `match(2+ matchers)`, the static_assert for same return types has been moved to `Impl::matchN`. Also, it doesn't rely on `FunctionTypeTraits` anymore, which has the added benefit of allowing `auto` in individual matchers.

Differential Revision: https://phabricator.services.mozilla.com/D98050
2020-12-02 00:17:46 +00:00
Gerald Squelart 32c0d65819 Bug 1500811 - Maybe::operator*()&&, ref()&&, value()&& - r=sg,sfink
There are also equivalents for `const&&`, which should be rare.

The small change in `LiveSavedFrameCache::insert` was necessary because `*lookup.framePtr()` now returns an rvalue-ref (as it should).

Differential Revision: https://phabricator.services.mozilla.com/D98049
2020-12-02 00:14:41 +00:00
Mike Hommey 14c1084f72 Bug 1679938 - Don't recurse the build into mfbt for projects that don't need it. r=firefox-build-system-reviewers,mhentges
While all toolkit and js-based projects make use of mfbt, some others,
like tools/crashreporter and tools/update-packaging, don't.

So instead of including mfbt from the top-level directory, include it
from the relevant project top-level mozbuilds.

This allows to remove the dependency on mfbt files in the hash for the
minidump-stackwalk and mar-tools toolchains.

Differential Revision: https://phabricator.services.mozilla.com/D98378
2020-12-01 23:52:03 +00:00
Andrew McCreight 37d53cb0c1 Bug 1680042 - Fix "detroyed" typos. DONTBUILD r=necko-reviewers,geckoview-reviewers,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D98341
2020-12-01 17:35:54 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke 73d4d57082 Bug 1676357 - Avoid including Layers.h in header files. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D96538

Depends on D96537
2020-11-23 16:09:05 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Simon Giesecke 8953086494 Bug 1677284 - Move PackingStrategy::Variant implementation to separate header file. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D97075
2020-11-23 15:49:14 +00:00
Simon Giesecke 290b2047d2 Bug 1677284 - Avoid using PackingStrategy::Variant fallback for CPUUsageWatcherError. r=nika,emilio
This also adds an UnusedZeroEnum template to Result.h, which can be used
for specializing UnusedZero for scoped enum types.

Differential Revision: https://phabricator.services.mozilla.com/D97074
2020-11-23 15:49:02 +00:00
Simon Giesecke a1064e29d7 Bug 1677284 - Use std::aligned_storage_t instead of mozilla::AlignedStorage2 in PackingStrategy::NullIsOk implementation. r=emilio
sizeof(mozilla::AlignedStorage2<T>) is always at least sizeof(uint64_t), which
is bad when T is bool, e.g.

Differential Revision: https://phabricator.services.mozilla.com/D97072
2020-11-23 15:48:53 +00:00
june wilde 27dea98f3f Bug 1658755 - Create MOZ_FIND_AND_VALIDATE Tainting validation macro; r=tjr,sg
Differential Revision: https://phabricator.services.mozilla.com/D90955
2020-11-19 22:45:10 +00:00
Sylvestre Ledru bebb9f9181 Bug 1519636 - Reformat with clang-format-11 to the Google coding style r=andi,sg,geckoview-reviewers,snorp
It is bringing some minor changes

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90795
2020-11-18 09:05:59 +00:00
Bogdan Tara 4f5f25592a Backed out changeset 49e43292c047 (bug 1658755) for HashFunctions.h failures CLOSED TREE 2020-11-17 21:50:00 +02:00
june wilde 0eb89cc72c Bug 1658755 - Create MOZ_FIND_AND_VALIDATE Tainting validation macro; r=tjr,sg
Differential Revision: https://phabricator.services.mozilla.com/D90955
2020-11-17 04:18:48 +00:00
Mirko Brodesser e0d88600e7 Bug 1677092: add `constexpr` `AnyOf`. r=sg
The STL supports it only with C++20.

Differential Revision: https://phabricator.services.mozilla.com/D97123
2020-11-17 08:30:12 +00:00
Gerald Squelart 831c1bd198 Bug 1677409 - MOZ_ASSERT(not null) in UniquePtr::operator* - r=sg
Dereferencing a null pointer is UB, so it's good to catch such misuses early.

Differential Revision: https://phabricator.services.mozilla.com/D97104
2020-11-16 20:11:24 +00:00
Razvan Maries 65ce92c4ba Backed out changeset 8531203d7207 (bug 1677092) for build bustages on TestAlgorithm.cpp. CLOSED TREE 2020-11-16 12:05:36 +02:00
Mirko Brodesser 2257cfe5bf Bug 1677092: add `constexpr` `AnyOf`. r=sg
The STL supports it only with C++20.

Differential Revision: https://phabricator.services.mozilla.com/D97123
2020-11-16 09:41:40 +00:00
Jean-Yves Avenard 1b9b84bbce Bug 1672072 - P12. Add constructor for WeakPtr(RefPtr). r=sg
This allows for nice template type deducation.

Differential Revision: https://phabricator.services.mozilla.com/D96368
2020-11-13 04:21:17 +00:00
Bogdan Tara 266d9ad46c Backed out 13 changesets (bug 1672072) for short.mp4.firstframe.html failures CLOSED TREE
Backed out changeset f093b7969e8b (bug 1672072)
Backed out changeset 28db8276ec2b (bug 1672072)
Backed out changeset ff8fe1b856b3 (bug 1672072)
Backed out changeset 091b9449c786 (bug 1672072)
Backed out changeset 89d9a12c0737 (bug 1672072)
Backed out changeset 9cb71fd4b43b (bug 1672072)
Backed out changeset 09adad7416e1 (bug 1672072)
Backed out changeset 9905650335ef (bug 1672072)
Backed out changeset 6f1d99e9c3a1 (bug 1672072)
Backed out changeset b59655b7a595 (bug 1672072)
Backed out changeset 1ef9d6d10508 (bug 1672072)
Backed out changeset fbf0b5117655 (bug 1672072)
Backed out changeset 65cd3b9de5c6 (bug 1672072)
2020-11-13 06:13:22 +02:00
Jean-Yves Avenard 5b9a3683e4 Bug 1672072 - P12. Add constructor for WeakPtr(RefPtr). r=sg
This allows for nice template type deducation.

Differential Revision: https://phabricator.services.mozilla.com/D96368
2020-11-12 22:54:14 +00:00
Simon Giesecke 29d19d608b Bug 1665462 - Add moving Vector::appendAll(Vector&&) overload. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D90522
2020-10-29 19:41:43 +00:00
Alexis Beingessner f045afd928 Bug 1506910 - Initialize the poison page with a static initializer. r=glandium,decoder
Poison was setup at the start of xpcom init when that was assumed to be early enough.
Since then, Poison was added to Maybe, and Maybe has been used everywhere, including in
our channel implementation. As a result, poison was being used before it was initialized.

This basically meant our poison pointers were being replaced with null instead, which
dances into some more UB than accessing a page we have actually allocated. Also, tsan
noticed that accesses to the value were racing with the initializer actually being
called!

A (dynamic) static initializer forces the poison initialization as we can reasonably
hope without getting CallOnce or singleton patterns involved.

Other changes:
  * Cleaned up the outdated documentation for mozWritePoison (the alignment
    restriction was removed in Bug 1414901)
  * Removed the poison supression from TSan

Differential Revision: https://phabricator.services.mozilla.com/D94251
2020-10-28 20:38:42 +00:00
Simon Giesecke 17accc12da Bug 1672946 - Revert disabling optimizations on mfbt tests that accidentally landed. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D94576
2020-10-27 08:48:19 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Ryan VanderMeulen 090467f15d Bug 1575293 - Update lz4 to version 1.9.2. r=froydnj,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D42682
2020-10-22 08:40:56 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
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