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

2269 Коммитов

Автор SHA1 Сообщение Дата
Sean Feng 3ae0be12e8 Bug 1667836 - Add CC support to LinkedList r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103798
2021-02-09 18:54:47 +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
Simon Giesecke 9c23bfdb2e Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
* LockedGetOriginInfosExceedingGroupLimit
* LockedGetOriginInfosExceedingGlobalLimit
* GetOriginInfosExceedingLimits
* ClearOrigins

Differential Revision: https://phabricator.services.mozilla.com/D101145
2021-02-02 17:46:40 +00:00
Csoregi Natalia 74e4cf16bf Backed out 5 changesets (bug 1689967, bug 1685677) for bustage on TestFlatten.cpp. CLOSED TREE
Backed out changeset 129b45a961fb (bug 1689967)
Backed out changeset d354b3d5312c (bug 1685677)
Backed out changeset 3c1b1f51f19c (bug 1685677)
Backed out changeset cc4f20677a7e (bug 1685677)
Backed out changeset bcbba85964cb (bug 1685677)
2021-02-02 17:05:23 +02:00
Simon Giesecke e4a5513e58 Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
* LockedGetOriginInfosExceedingGroupLimit
* LockedGetOriginInfosExceedingGlobalLimit
* GetOriginInfosExceedingLimits
* ClearOrigins

Differential Revision: https://phabricator.services.mozilla.com/D101145
2021-02-02 12:53:44 +00:00
smolnar d18d54a300 Backed out 4 changesets (bug 1685677) for causing build bustage in TestFlatten. CLOSED TREE DONTBUILD
Backed out changeset 0110eb26213b (bug 1685677)
Backed out changeset e3223c398959 (bug 1685677)
Backed out changeset d1fbaf6882a3 (bug 1685677)
Backed out changeset e1e26422161e (bug 1685677)
2021-02-02 14:46:30 +02:00
Simon Giesecke 0da4951ba0 Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
* LockedGetOriginInfosExceedingGroupLimit
* LockedGetOriginInfosExceedingGlobalLimit
* GetOriginInfosExceedingLimits
* ClearOrigins

Differential Revision: https://phabricator.services.mozilla.com/D101145
2021-02-02 10:10:21 +00:00
Butkovits Atila cc5cb272ff Backed out 2 changesets (bug 1685677) for causing xpcshell failure. CLOSED TREE
Backed out changeset 26e9adf102c8 (bug 1685677)
Backed out changeset ed3a62552625 (bug 1685677)
2021-02-01 22:54:39 +02:00
Simon Giesecke f78d2e7d7e Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
* LockedGetOriginInfosExceedingGroupLimit
* LockedGetOriginInfosExceedingGlobalLimit
* GetOriginInfosExceedingLimits
* ClearOrigins

Differential Revision: https://phabricator.services.mozilla.com/D101145
2021-02-01 14:42:15 +00:00
Jan Varga 165dbaf2e5 Bug 1689802 - Fix construction of MovingNotNull from NotNull; r=sg
Depends on D103556

Differential Revision: https://phabricator.services.mozilla.com/D103632
2021-02-01 13:52:31 +00:00
smolnar 0fc1e1e521 Backed out 4 changesets (bug 1685677) for causing xpcshell failures in test_storagePressure. CLOSED TREE
Backed out changeset 263d593f8609 (bug 1685677)
Backed out changeset 81a737afce4f (bug 1685677)
Backed out changeset ea958694bd17 (bug 1685677)
Backed out changeset 121e93b3787f (bug 1685677)
2021-02-01 16:38:01 +02:00
Simon Giesecke 1134a78170 Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
* LockedGetOriginInfosExceedingGroupLimit
* LockedGetOriginInfosExceedingGlobalLimit
* GetOriginInfosExceedingLimits
* ClearOrigins

Differential Revision: https://phabricator.services.mozilla.com/D101145
2021-02-01 13:37:30 +00:00
Mike Hommey 990995c428 Bug 1689281 - Remove MFBT_DATA for kBase10MaximalLength. r=nika
It was added in bug 614188. 8 years have passed, and it doesn't seem
necessary anymore (if it ever was).

Differential Revision: https://phabricator.services.mozilla.com/D103265
2021-01-28 16:50:14 +00:00
Mike Hommey 2b96dd066d Bug 1686831 - Allow double-conversion's ToFixed to handle ±DBL_MAX. r=nika
While at this point PrintfTarget doesn't use double-conversion, add a
test that it can (and thus will) handle the largest double output possible
with the default %f precision.

Differential Revision: https://phabricator.services.mozilla.com/D103431
2021-01-29 16:54:03 +00:00
Mike Hommey 504ef77af2 Bug 1686831 - Handle trailing zero removal in double-conversion. r=nika,jwalden,Gankra
Bug 608915 switched nsString::AppendFloat to double-conversion, while
handling trailing zero removal on its own. This can be made more
effectively when doing so in double-conversion itself, support for which
was merged upstream in https://github.com/google/double-conversion/pull/149.

This makes the used_exponential_notation outparam unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D102698
2021-01-29 04:25:53 +00:00
Mike Hommey cc35b21767 Bug 1686831 - Update double-conversion to upstream revision bf46072. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D103134
2021-01-29 04:25:27 +00:00
Tooru Fujisawa 78aa883d23 Bug 1687428 - Part 28: Store TaggedParserAtomIndex in ParserAtomsTable. r=nbp
As a preparation to remove `index_` field from ParserAtomEntry,
ParserAtomsTable should maintain a map from ParserAtomEntry pointer to
TaggedParserAtomIndex.

Differential Revision: https://phabricator.services.mozilla.com/D102559
2021-01-29 19:43:02 +00:00
Csoregi Natalia 8db3ebb5da Backed out 9 changesets (bug 1686831) for sanitizer failures on nsTSubstring.cpp. CLOSED TREE
Backed out changeset 0e03d508c8d4 (bug 1686831)
Backed out changeset cf6dd6eab427 (bug 1686831)
Backed out changeset 308000f1e14b (bug 1686831)
Backed out changeset c4d470be0184 (bug 1686831)
Backed out changeset 9751918b1ccb (bug 1686831)
Backed out changeset dd9b7e71dcfb (bug 1686831)
Backed out changeset 486a184530a7 (bug 1686831)
Backed out changeset b64d3e89bf68 (bug 1686831)
Backed out changeset dcc6396e455a (bug 1686831)
2021-01-28 09:55:28 +02:00
Mike Hommey 411ab98ac3 Bug 1686831 - Handle trailing zero removal in double-conversion. r=nika,jwalden,Gankra
Bug 608915 switched nsString::AppendFloat to double-conversion, while
handling trailing zero removal on its own. This can be made more
effectively when doing so in double-conversion itself, support for which
was merged upstream in https://github.com/google/double-conversion/pull/149.

This makes the used_exponential_notation outparam unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D102698
2021-01-27 01:06:34 +00:00
Mike Hommey f1201eb9e4 Bug 1686831 - Update double-conversion to upstream revision bf46072. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D103134
2021-01-28 05:01:47 +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
Ryan VanderMeulen 0eb8fd796c Bug 1682604 - Update lz4 to 1.9.3. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D99816
2021-01-19 14:13:47 +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
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
Simon Giesecke 67084ddd9b Bug 1666216 - Enable ScopedLogExtraInfo logging. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D90877
2020-09-30 08:24:18 +00:00
Simon Giesecke c711008a61 Bug 1666219 - Introduce QM_TRY_INSPECT to avoid unwrapping Result objects where not necessary. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D90843
2020-09-29 10:57:14 +00:00
Simon Giesecke e003e4d581 Bug 1667019 - Simplify moving of Results for PackingStrategy NullIsOk. r=emilio
No longer reset a moved-from Result to an error state, which required
UnusedZero<E>::GetDefaultValue, which was somewhat confusing, and might
also be inefficient. Leaving Result in a valid state, which might be a
success or error state is sufficient.

Differential Revision: https://phabricator.services.mozilla.com/D91250
2020-09-29 08:09:02 +00:00
Emilio Cobos Álvarez 3aa40e5fb9 Bug 1658571 - Add a missing "explicit" in a test.
MANUAL PUSH: unit test fix in CLOSED TREE
2020-09-24 19:51:46 +02:00
Emilio Cobos Álvarez 061fc9d988 Bug 1658571 - Add MainThreadWeakPtr and use it in PreloaderBase::RedirectSink. r=sg,smaug
Per matrix discussion, this is safer to uplift (instead of relying on
the RedirectSink being released on the main thread).

Differential Revision: https://phabricator.services.mozilla.com/D91270
2020-09-24 16:38:35 +00:00
Simon Giesecke 8804eb9be3 Bug 1666416 - Allow conversion from Result with convertible error type. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D90960
2020-09-22 11:24:08 +00:00
Simon Giesecke ccdc97d011 Bug 1666422 - Add missing include for cstdint. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D90963
2020-09-22 08:52:51 +00:00
Simon Giesecke 32f7547296 Bug 1666200 - Support in-place construction of Result success value. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D90839
2020-09-21 13:15:13 +00:00
Simon Giesecke 2b1eb28b6a Bug 1665927 - Use free LSB optimization for empty types with mozilla::Result. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D90699
2020-09-21 13:14:53 +00:00
Simon Giesecke c8ed33ab9d Bug 1665850 - Remove specifics for reference error types from mozilla::Result. r=emilio,jandem
Also update the documentation on optimizations and representation to
better reflect the current situation.

Differential Revision: https://phabricator.services.mozilla.com/D90662
2020-09-21 13:14:28 +00:00
Simon Giesecke eaa00050e4 Bug 1665850 - Switch JS to use non-reference errors with mozilla::Result. r=jandem
Also switch optimizations for HasFreeLSB and existing tests to no longer
use references.

Differential Revision: https://phabricator.services.mozilla.com/D90661
2020-09-21 13:14:10 +00:00
Simon Giesecke 2e065c64d6 Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem
Among other things, there were some misuses of std::forward, and
GenericErrorResult was (presumably accidentally) instatiated with
references as the template argument type, e.g. const nsresult&,
which circumvented the check for not calling it with NS_OK in
ResultExtensions.h

Differential Revision: https://phabricator.services.mozilla.com/D90561
2020-09-21 13:12:48 +00:00
Bogdan Tara 395ecea593 Backed out changeset a1e4531f2091 (bug 1666200) for TestResult.cpp related bustage CLOSED TREE 2020-09-21 15:55:42 +03:00
Simon Giesecke 2cf66d3f89 Bug 1666200 - Support in-place construction of Result success value. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D90839
2020-09-21 11:47:47 +00:00
Butkovits Atila 270e7e2200 Backed out 5 changesets (bug 1665927, bug 1665614, bug 1665850) for causing bustage on Result.h. CLOSED TREE
Backed out changeset 1467e76399e8 (bug 1665927)
Backed out changeset ebd4dfbc0a88 (bug 1665850)
Backed out changeset 5e23340e3b39 (bug 1665850)
Backed out changeset 5bc547e7a773 (bug 1665850)
Backed out changeset 8d88afb85a78 (bug 1665614)
2020-09-21 15:25:16 +03:00
Simon Giesecke 6b3d1793e7 Bug 1665927 - Use free LSB optimization for empty types with mozilla::Result. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D90699
2020-09-21 11:09:31 +00:00
Simon Giesecke f193981fb7 Bug 1665850 - Remove specifics for reference error types from mozilla::Result. r=emilio,jandem
Also update the documentation on optimizations and representation to
better reflect the current situation.

Differential Revision: https://phabricator.services.mozilla.com/D90662
2020-09-21 11:09:09 +00:00
Simon Giesecke 70bda1ef61 Bug 1665850 - Switch JS to use non-reference errors with mozilla::Result. r=jandem
Also switch optimizations for HasFreeLSB and existing tests to no longer
use references.

Differential Revision: https://phabricator.services.mozilla.com/D90661
2020-09-21 11:11:02 +00:00
Simon Giesecke 3b0420646e Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem
Among other things, there were some misuses of std::forward, and
GenericErrorResult was (presumably accidentally) instatiated with
references as the template argument type, e.g. const nsresult&,
which circumvented the check for not calling it with NS_OK in
ResultExtensions.h

Differential Revision: https://phabricator.services.mozilla.com/D90561
2020-09-21 10:38:19 +00:00
Simon Giesecke 0fef58f699 Bug 1664844 - Add DebugOnly::inspect member function. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D90133
2020-09-18 06:33:12 +00:00
Csoregi Natalia 2306d2079a Backed out 11 changesets (bug 1663924, bug 1664844) for multiple failures. CLOSED TREE
Backed out changeset 2da9fde7a109 (bug 1663924)
Backed out changeset 9353759cc783 (bug 1663924)
Backed out changeset 309354891d60 (bug 1663924)
Backed out changeset 4e51461c369c (bug 1663924)
Backed out changeset e3196b68932c (bug 1663924)
Backed out changeset 25b16cbae152 (bug 1664844)
Backed out changeset e02961ac5ee7 (bug 1663924)
Backed out changeset dde2058c20ef (bug 1663924)
Backed out changeset a80f52551e3a (bug 1663924)
Backed out changeset 0c37ce712c2c (bug 1663924)
Backed out changeset 8cc5dcc86f40 (bug 1663924)
2020-09-18 04:52:32 +03:00
Simon Giesecke db717b00e5 Bug 1664844 - Add DebugOnly::inspect member function. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D90133
2020-09-17 08:44:30 +00:00
Simon Giesecke 59cd4601d7 Bug 1663902 - Avoid gcc emitting lots of static constructors for UnusedZero<T&>::defaultValue. r=dmajor
Differential Revision: https://phabricator.services.mozilla.com/D90359
2020-09-16 13:58:49 +00:00
Razvan Maries 559e163f24 Backed out 9 changesets (bug 1663924, bug 1664844) for Linux Mochitests leaks. CLOSED TREE
Backed out changeset 8d28611ac9b2 (bug 1663924)
Backed out changeset e0b0b3a19544 (bug 1663924)
Backed out changeset 884e286909f9 (bug 1663924)
Backed out changeset ffed28f0b547 (bug 1664844)
Backed out changeset 4c22c3c8aa28 (bug 1663924)
Backed out changeset fcaed021597c (bug 1663924)
Backed out changeset 30394cbcaaf6 (bug 1663924)
Backed out changeset 014bcf5d13b9 (bug 1663924)
Backed out changeset ccf09dfa817a (bug 1663924)
2020-09-16 19:16:21 +03:00
Simon Giesecke ab0b7510ad Bug 1665026 - Prevent ToResultInvoke from being instantiated with a raw pointer result type. r=janv
Differential Revision: https://phabricator.services.mozilla.com/D90264
2020-09-16 15:11:56 +00:00
Simon Giesecke 7c10b87921 Bug 1664844 - Add DebugOnly::inspect member function. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D90133
2020-09-16 14:56:02 +00:00
Simon Giesecke 720fbb0265 Bug 1661404 - Add MOZ_TO_RESULT_INVOKE_TYPED macro. r=janv
Differential Revision: https://phabricator.services.mozilla.com/D90368
2020-09-16 10:18:19 +00:00
Gerald Squelart b3972fb3c4 Bug 1657033 - There is no more need for JSONWriteFunc::WriteLiteral - r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D86193
2020-09-14 01:48:39 +00:00
Gerald Squelart 782cf5d3ad Bug 1657033 - Use Span<const char> in JSONWriter - r=froydnj
In most situations, JSONWriter users already know string lengths (either directly, or through `nsCString` and friends), so we should keep this information through JSONWriter and not recompute it again.
This also allows using JSONWriter with sub-strings (e.g., from a bigger buffer), without having to create null-terminated strings.

Public JSONWriter functions have overloads that accept literal strings.

Differential Revision: https://phabricator.services.mozilla.com/D86192
2020-09-14 02:33:20 +00:00
Gerald Squelart 89b62c22de Bug 1657033 - Make `MakeStringSpan` constexpr - r=froydnj
MakeStringSpan("...") will be able to construct spans from string literals at compile time.

Differential Revision: https://phabricator.services.mozilla.com/D86190
2020-09-14 01:44:39 +00:00
Simon Giesecke 250dabd821 Bug 1663628 - Make Maybe::extract work with MOZ_NON_AUTOABLE type T. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D89445
2020-09-08 13:22:16 +00:00
Jan Varga d4d58eddc9 Bug 1663648 - Fix mozilla::Result::map's return type definition; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D89457
2020-09-08 14:39:41 +00:00
Simon Giesecke 2d21df0e59 Bug 1661428 - Support PackingVariant::NullIsOk also with non-trivially-default-constructible V. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88444
2020-09-03 14:14:41 +00:00
Simon Giesecke d85bd68479 Bug 1661457 - Add in-place constructor to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88418
2020-09-02 17:56:35 +00:00
Simon Giesecke 5cacc3e1dc Bug 1661502 - Make Result move-only. r=froydnj,jandem
Differential Revision: https://phabricator.services.mozilla.com/D88443
2020-09-02 17:56:23 +00:00
Simon Giesecke bf7bd90871 Bug 1661497 - Make DebugOnly work with move-only value types. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88442
2020-09-02 17:56:10 +00:00
Simon Giesecke bd28698eb3 Bug 1661428 - Use CompactPair instead of Variant for trivially default-constructible V and UnusedZero E. r=froydnj
It seems that the clang toolchain has trouble optimizing away the tag access in
a `mozilla::Variant`. Use of a `CompactPair` seems to be better when `E` is
small (all cases where `UnusedZero<E>` is true are small right now anyway).
While this doesn't change `sizeof(Result<V, E>)` in most cases, it makes
the generated code simpler/smaller: As of now, this reduce the overall VM size
of libxul.so by ca. 59K.

Without additional effort, this requires and leads to default-construction of
a `V` even in cases where it is never accessed, so this is restricted to
trivially default-constructible `V` for now.

This could be avoided by replacing  `CompactPair<V, E>` by
`CompactPair<AlignedStorage2<V>, E>`.

Differential Revision: https://phabricator.services.mozilla.com/D88393
2020-09-02 17:55:55 +00:00
Razvan Maries eae150a880 Backed out 5 changesets (bug 1661457, bug 1661428, bug 1661497, bug 1661502) for build bustages on Result.h. CLOSED TREE
Backed out changeset fbf42b3b51f3 (bug 1661428)
Backed out changeset 83f3f36d540f (bug 1661457)
Backed out changeset 8a9dce0d08ce (bug 1661502)
Backed out changeset 733df139089a (bug 1661497)
Backed out changeset fca770fc0956 (bug 1661428)
2020-09-02 19:44:47 +03:00
Simon Giesecke 261cda7f20 Bug 1661428 - Support PackingVariant::NullIsOk also with non-trivially-default-constructible V. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88444
2020-09-02 16:31:43 +00:00
Simon Giesecke 156682b3c2 Bug 1661457 - Add in-place constructor to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88418
2020-09-02 16:23:13 +00:00
Simon Giesecke d4179392a0 Bug 1661502 - Make Result move-only. r=froydnj,jandem
Differential Revision: https://phabricator.services.mozilla.com/D88443
2020-09-02 16:23:01 +00:00
Simon Giesecke 80d380f0ed Bug 1661497 - Make DebugOnly work with move-only value types. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88442
2020-09-02 16:22:38 +00:00
Simon Giesecke d5f6d76c5a Bug 1661428 - Use CompactPair instead of Variant for trivially default-constructible V and UnusedZero E. r=froydnj
It seems that the clang toolchain has trouble optimizing away the tag access in
a `mozilla::Variant`. Use of a `CompactPair` seems to be better when `E` is
small (all cases where `UnusedZero<E>` is true are small right now anyway).
While this doesn't change `sizeof(Result<V, E>)` in most cases, it makes
the generated code simpler/smaller: As of now, this reduce the overall VM size
of libxul.so by ca. 59K.

Without additional effort, this requires and leads to default-construction of
a `V` even in cases where it is never accessed, so this is restricted to
trivially default-constructible `V` for now.

This could be avoided by replacing  `CompactPair<V, E>` by
`CompactPair<AlignedStorage2<V>, E>`.

Differential Revision: https://phabricator.services.mozilla.com/D88393
2020-09-02 16:22:25 +00:00
Kartikaya Gupta 49c359630a Bug 1661798 - Have the LinkedList destructor emit the buggy template specialization. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88663
2020-08-28 20:07:26 +00:00
Simon Giesecke 1997b4ea0d Bug 1661083 - Support raw pointers with MOZ_TO_RESULT_INVOKE. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88168
2020-08-28 15:50:49 +00:00
Simon Giesecke ff85972891 Bug 1661476 - Prevent Result<const V, E> or Result<V, const E> from being instantiated. r=froydnj
Also, remove the existing uses of Result<const nsCString, nsresult> in URLPreloader
and Result<CryptoScheme, const nsCString> in SampleIterator.

Differential Revision: https://phabricator.services.mozilla.com/D88419
2020-08-28 14:16:35 +00:00
Razvan Maries 7a010f17ae Backed out 11 changesets (bug 1661083, bug 1661085, bug 1661084) for build bustages on ResultExtensions.h. CLOSED TREE
Backed out changeset 962967831dd4 (bug 1661085)
Backed out changeset 8e61a7d2daf9 (bug 1661085)
Backed out changeset 1edbc081c9f0 (bug 1661085)
Backed out changeset c640f4126079 (bug 1661085)
Backed out changeset b5fc9ebaac12 (bug 1661085)
Backed out changeset 4e3faaadccb6 (bug 1661085)
Backed out changeset 522cdd011e03 (bug 1661085)
Backed out changeset 896e47fc24e3 (bug 1661085)
Backed out changeset bf4043d4ce8e (bug 1661085)
Backed out changeset d0162bb5012e (bug 1661084)
Backed out changeset f0e7db520938 (bug 1661083)
2020-08-28 16:27:58 +03:00
Simon Giesecke a7f224accb Bug 1661083 - Support raw pointers with MOZ_TO_RESULT_INVOKE. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D88168
2020-08-28 10:02:36 +00:00
Jan Varga ecaff7daea Bug 1659673 - Add the `mozilla::Result::orElse` method; r=froydnj,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D87418
2020-08-24 14:44:50 +00:00
Jan Varga d749be0c59 Bug 1659660 - Improve documentation and testing for mozilla::Result::map and mozilla::Result::mapErr; r=froydnj,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D87414
2020-08-20 11:04:12 +00:00
Butkovits Atila 850817430e Backed out 3 changesets (bug 1658874, bug 1658324, bug 1659660) for bustage at ActorsParent.cpp. CLOSED TREE
Backed out changeset b69e256013a3 (bug 1659660)
Backed out changeset 4939692a9047 (bug 1658874)
Backed out changeset e27fb7cd29fe (bug 1658324)
2020-08-20 13:57:20 +03:00
Jan Varga f66e9112b5 Bug 1659660 - Improve documentation and testing for mozilla::Result::map and mozilla::Result::mapErr; r=froydnj,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D87414
2020-08-20 09:22:09 +00:00
Jeff Gilbert 0d33c47098 Bug 1656545 - Range cannot support nullptr with non-zero length. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87528
2020-08-20 00:33:52 +00:00
Jan Varga 246bfa7db7 Bug 1659962 - Add additional MOZ_ARG_* macros; r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D87579
2020-08-19 14:31:40 +00:00
Jan Varga 8773058b99 Bug 1659909 - ToResultInvoke should also work with RefPtr/nsCOMPtr on win32; r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D87556
2020-08-19 14:34:06 +00:00
Eugen Sawin 9caff81fa1 Bug 1623715 - [4.1] Fix LinkedList::length() for a const context. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84543
2020-08-18 17:29:07 +00:00
Razvan Maries 1cad430a1a Backed out 7 changesets (bug 1623715) for build bustages on nsWindow.cpp. CLOSED TREE
Backed out changeset 9704afdeefb1 (bug 1623715)
Backed out changeset 2e7e298cfe27 (bug 1623715)
Backed out changeset 579df1a653ee (bug 1623715)
Backed out changeset 4361ef84e780 (bug 1623715)
Backed out changeset 898972ec680c (bug 1623715)
Backed out changeset a118a4d72bef (bug 1623715)
Backed out changeset 4ff55894774d (bug 1623715)
2020-08-18 18:38:43 +03:00
Eugen Sawin 9ee999f3c0 Bug 1623715 - [4.1] Fix LinkedList::length() for a const context. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84543
2020-08-18 14:37:27 +00:00
Dorel Luca 6e3ab7e5fa Backed out 7 changesets (bug 1623715) for Linting failure and android build bustage. CLOSED TREE
Backed out changeset c8ca1d1866e7 (bug 1623715)
Backed out changeset 1b7c3fb0da3b (bug 1623715)
Backed out changeset 4887dea37231 (bug 1623715)
Backed out changeset 47f3eb481909 (bug 1623715)
Backed out changeset 6e7ce9e5f89b (bug 1623715)
Backed out changeset ddff358f800e (bug 1623715)
Backed out changeset cd585490e79b (bug 1623715)
2020-08-18 00:20:24 +03:00
Eugen Sawin e7ef0233d7 Bug 1623715 - [4.1] Fix LinkedList::length() for a const context. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84543
2020-08-17 20:37:37 +00:00
Simon Giesecke fa7f470279 Bug 1658528 - Add MOZ_TO_RESULT_INVOKE macro. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D75754
2020-08-17 06:34:39 +00:00
Simon Giesecke 531508b985 Bug 1658524 - Make ToResultInvoke also accept RefPtr<T>/nsCOMPtr<T>. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D86692
2020-08-12 18:33:14 +00:00
Tom Ritter 73764ca6a5 Bug 1656896 - Improve the Tainting macros and add unit tests r=froydnj
The patch:
 - Changes from an explicit capture in MOZ_VALIDATE_AND_GET_HELPER3/MOZ_IS_VALID
   to a default capture, to support referencing local variables in conditions.
 - Moves things around in Tainting.h and adds comments
 - Adds unit tests for the macros

Differential Revision: https://phabricator.services.mozilla.com/D85889
2020-08-07 19:14:22 +00:00
Simon Giesecke 1a9da56b94 Bug 1653335 - Get rid of MakeSpan functions. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83818
2020-08-07 07:50:04 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Simon Giesecke 48dd75b228 Bug 1653335 - Add/fix constructors and deduction guides for Span. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83813
2020-08-07 07:42:52 +00:00
Simon Giesecke dea5b543db Bug 1653335 - Remove uses of MakeSpan in return statements. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83812
2020-08-07 07:42:50 +00:00
David Major 7bdbf197ee Bug 1657455 - Give EnumSet an assignment operator r=sg
Newer clangs complain that we explicitly defined a copy constructor but not a copy assignment.

Differential Revision: https://phabricator.services.mozilla.com/D86061
2020-08-06 20:40:37 +00:00
Kagami Sascha Rosylight b6115988e8 Bug 1656041 - Part 2: Return a struct from GetFrameFromDirection r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85317
2020-08-04 15:23:47 +00:00
Simon Giesecke 18d9c43178 Bug 1654564 - Fix documentation of requirements on target in MOZ_TRY_VAR. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84531
2020-08-04 08:50:26 +00:00
Csoregi Natalia e321d2b4c3 Backed out changeset 6b53d90ee8b4 (bug 1656894) for asan bustage on xxhash.h. CLOSED TREE 2020-08-03 22:53:58 +03:00
Ryan VanderMeulen 4837f819c1 Bug 1656894 - Update xxHash to version 0.8.0. r=dthayer
Differential Revision: https://phabricator.services.mozilla.com/D85767
2020-08-03 17:30:19 +00:00
Nathan Froyd a527a4b54d Bug 1223932 - remove mfbt/GuardObjects.h; r=jwalden
We no longer need this for reasons outlined in the previous commit.

Depends on D85168

Differential Revision: https://phabricator.services.mozilla.com/D85169
2020-07-31 18:58:32 +00:00
Sylvestre Ledru 843f943758 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D85678
2020-08-02 15:29:15 +00:00
Jeff Gilbert fa50c42c4b Bug 1656034 - Add UnderlyingValue() to mfbt. - r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D85495
2020-07-31 23:04:44 +00:00