gecko-dev/mfbt
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
..
double-conversion Bug 1686831 - Allow double-conversion's ToFixed to handle ±DBL_MAX. r=nika 2021-01-29 16:54:03 +00:00
lz4 Bug 1682604 - Update lz4 to 1.9.3. r=sg 2021-01-19 14:13:47 +00:00
tests Bug 1687391 - Avoid using a spinlock in ThreadSafeWeakReference, r=glandium,mccr8,Gankra,sg 2021-02-03 17:00:04 +00:00
Algorithm.h Bug 1677092: add `constexpr` `AnyOf`. r=sg 2020-11-17 08:30:12 +00:00
Alignment.h Bug 1325771 - mfbt: Reorder parameters for MOZ_ALIGNED_DECL r=jwalden 2020-06-03 18:31:06 +00:00
AllocPolicy.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
AlreadyAddRefed.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
Array.h Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj 2020-08-07 07:49:47 +00:00
ArrayUtils.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
Assertions.cpp Bug 1646171 - Fix vsnprintf complaint in Assertions.cpp r=froydnj 2020-06-16 21:26:16 +00:00
Assertions.h Bug 1652914 - Part 2: Remove unused MOZ_STATIC_ASSERT macro. r=jwalden 2020-07-17 02:48:36 +00:00
AtomicBitfields.h Bug 1681546 - rename MOZ_ATOMIC_BITFIELDS methods to Load/Store. r=valentin,necko-reviewers 2020-12-09 18:14:55 +00:00
Atomics.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
Attributes.h Bug 1651323 - Add MOZ_LIFETIME_BOUND attribute. r=andi 2020-07-10 12:16:13 +00:00
BinarySearch.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
BitSet.h Bug 1686219 - Add BitSet::SetAll and ResetAll methods r=heycam 2021-01-20 10:03:53 +00:00
BloomFilter.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
Buffer.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
BufferList.h Bug 1679611 - Part 2: Add test for BufferList::RangeLength. r=sfink 2020-12-02 18:48:22 +00:00
Casting.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
ChaosMode.cpp Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown 2020-02-27 17:39:15 +00:00
ChaosMode.h Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown 2020-02-27 17:39:15 +00:00
Char16.h Bug 1602452 - Make member functions of nsTStringRepr defined in header constexpr. r=froydnj 2019-12-10 08:40:48 +00:00
CheckedInt.h Bug 1519636 - Reformat recent changes to the Google coding style r=jgilbert 2020-04-05 13:34:58 +00:00
CompactPair.h Bug 1432988 - Add hash for pair types. r=botond 2020-12-04 21:57:03 +00:00
Compiler.h Bug 1576056 - delete all the standard library-related checks in Compiler.h; r=dmajor 2019-08-27 22:42:17 +00:00
Compression.cpp Bug 1653335 - Remove uses of MakeSpan in return statements. r=froydnj 2020-08-07 07:42:50 +00:00
Compression.h Bug 1677284 - Move PackingStrategy::Variant implementation to separate header file. r=emilio 2020-11-23 15:49:14 +00:00
DbgMacro.h Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj 2020-08-07 07:49:47 +00:00
DebugOnly.h Bug 1664844 - Add DebugOnly::inspect member function. r=jwalden 2020-09-18 06:33:12 +00:00
DefineEnum.h Bug 1626772 - Fixes for gcc 9 warnings r=botond 2020-04-10 20:40:03 +00:00
DoublyLinkedList.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
EndianUtils.h Bug 1519636 - Reformat recent changes to the Google coding style r=andi 2020-07-04 09:38:43 +00:00
EnumSet.h Bug 1657455 - Give EnumSet an assignment operator r=sg 2020-08-06 20:40:37 +00:00
EnumTypeTraits.h Bug 1656034 - Add UnderlyingValue() to mfbt. - r=froydnj 2020-07-31 23:04:44 +00:00
EnumeratedArray.h Bug 1626197 - Remove custom copy/move operations on EnumeratedArray. r=froydnj 2020-03-31 13:17:21 +00:00
EnumeratedRange.h Bug 1614512 - Give mozilla::Side and mozilla::Corner a fixed underlying type. r=froydnj 2020-02-11 14:11:06 +00:00
FStream.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
FastBernoulliTrial.h Bug 1577051 - Fix an implicit-conversion-changes-value warning with new-enough clang by explicitly converting. r=froydnj 2019-08-28 16:35:22 +00:00
FloatingPoint.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
FloatingPoint.h Bug 1687441 part 7 - Add NumberEqualsInt64 and NumberIsInt64 to MFBT. r=sg 2021-01-27 15:52:29 +00:00
FunctionRef.h Bug 1624495 - Support move only arguments such as UniquePtr in FunctionRef. r=botond 2020-05-21 01:56:57 +00:00
FunctionTypeTraits.h Bug 1611520 - gcc-10: Include <cstddef> in FunctionTypeTraits.h r=gerald 2020-02-01 10:23:38 +00:00
HashFunctions.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
HashFunctions.h Bug 1433142 - Add support for hashing enum values. r=jwalden 2020-05-27 23:44:51 +00:00
HashTable.h Bug 1687428 - Part 28: Store TaggedParserAtomIndex in ParserAtomsTable. r=nbp 2021-01-29 19:43:02 +00:00
HelperMacros.h Bug 1547519 - Rename NS_STRINGIFY to MOZ_STRINGIFY, move to mfbt, and unify stragglers r=glandium 2019-09-04 02:40:32 +00:00
InitializedOnce.h Bug 1685679 - Add do_Init function to allow assignment to InitializedOnce variables. r=janv 2021-01-15 11:23:41 +00:00
IntegerPrintfMacros.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
IntegerRange.h Bug 1645429 - Use std::reverse_iterator instead of mozilla::ReverseIterator where possible. r=froydnj 2020-06-16 10:14:01 +00:00
IntegerTypeTraits.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
JSONWriter.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
JSONWriter.h Bug 1657033 - Use Span<const char> in JSONWriter - r=froydnj 2020-09-14 02:33:20 +00:00
JsRust.h Bug 1490601 part 2 - Move C++ entry points to encoding_c_mem to mfbt/. r=jwalden 2019-09-18 08:26:34 +00:00
Latin1.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
Likely.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
LinkedList.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
MacroArgs.h Bug 1666219 - Introduce QM_TRY_INSPECT to avoid unwrapping Result objects where not necessary. r=dom-workers-and-storage-reviewers,janv 2020-09-29 10:57:14 +00:00
MacroForEach.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
MathAlgorithms.h Bug 1625473: Use type traits for AbsReturnType. r=froydnj 2020-03-28 16:07:06 +00:00
Maybe.h Bug 1683227 - Add a note to Maybe::valueOr() about a suboptimal usage. r=sg DONTBUILD 2020-12-21 18:32:26 +00:00
MaybeOneOf.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
MemoryChecking.h Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
MemoryReporting.h
NonDereferenceable.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
NotNull.h Bug 1685677 - Extract functions from CheckTemporaryStorageLimits and rename it to CleanupTemporaryStorage. r=dom-workers-and-storage-reviewers,janv 2021-02-02 17:46:40 +00:00
Opaque.h Bug 1625138 - Part 16: Replace mozilla::IsIntegral with std::is_integral. r=froydnj 2020-03-28 13:57:15 +00:00
OperatorNewExtensions.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
PairHash.h Bug 1432988 - Add hash for pair types. r=botond 2020-12-04 21:57:03 +00:00
Path.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
PodOperations.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
Poison.cpp Bug 1506910 - Initialize the poison page with a static initializer. r=glandium,decoder 2020-10-28 20:38:42 +00:00
Poison.h Bug 1506910 - Initialize the poison page with a static initializer. r=glandium,decoder 2020-10-28 20:38:42 +00:00
RandomNum.cpp Bug 461204 - Improve the random number generator for the boundaries in multipart/form-data r=smaug 2020-01-13 20:41:14 +00:00
RandomNum.h Bug 461204 - Improve the random number generator for the boundaries in multipart/form-data r=smaug 2020-01-13 20:41:14 +00:00
Range.h Bug 1656545 - Range cannot support nullptr with non-zero length. r=froydnj 2020-08-20 00:33:52 +00:00
RangedArray.h Bug 1652561 - Remote Win32k calls in nsLookAndFeel::GetFontImpl() r=emilio,geckoview-reviewers,agi,froydnj 2020-07-31 16:21:44 +00:00
RangedPtr.h Bug 1607940 - Stand up webgl.out-of-process:true path. r=handyman,nika,froydnj 2020-07-21 22:56:52 +00:00
ReentrancyGuard.h Bug 1223932 - delete guard object uses from the tree; r=jwalden 2020-07-30 14:22:38 +00:00
RefCountType.h
RefCounted.h Bug 1687391 - Avoid using a spinlock in ThreadSafeWeakReference, r=glandium,mccr8,Gankra,sg 2021-02-03 17:00:04 +00:00
RefPtr.h Bug 1676357 - Avoid including Layers.h in header files. r=botond 2020-11-23 16:09:05 +00:00
Result.h Bug 1677284 - Move PackingStrategy::Variant implementation to separate header file. r=emilio 2020-11-23 15:49:14 +00:00
ResultExtensions.h Bug 1665850 - Switch JS to use non-reference errors with mozilla::Result. r=jandem 2020-09-21 13:14:10 +00:00
ResultVariant.h Bug 1677284 - Move PackingStrategy::Variant implementation to separate header file. r=emilio 2020-11-23 15:49:14 +00:00
ReverseIterator.h Bug 1646391 - Simplify ReverseIterator. r=froydnj 2020-06-18 07:49:16 +00:00
RollingMean.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
SHA1.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
SHA1.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
SPSCQueue.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
STYLE Bug 1550108 - Pull in secondary lz4 libraries r=glandium 2019-10-04 20:44:08 +00:00
Saturate.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
ScopeExit.h Bug 1223932 - delete guard object uses from the tree; r=jwalden 2020-07-30 14:22:38 +00:00
Scoped.h Bug 1223932 - delete guard object uses from the tree; r=jwalden 2020-07-30 14:22:38 +00:00
SegmentedVector.h Bug 1631274 - Make SegmentedVector::InfallibleAppend failures into OOM crashes. r=glandium 2020-04-28 14:00:21 +00:00
SharedLibrary.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
SmallPointerArray.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
Span.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
SplayTree.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
Sprintf.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
StaticAnalysisFunctions.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
TaggedAnonymousMemory.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
TaggedAnonymousMemory.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
Tainting.h Bug 1658755 - Create MOZ_FIND_AND_VALIDATE Tainting validation macro; r=tjr,sg 2020-11-19 22:45:10 +00:00
TemplateLib.h Bug 1625138 - Part 26: Replace mozilla::Conditional with std::conditional. r=froydnj 2020-03-28 13:57:18 +00:00
TextUtils.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
ThreadLocal.h Bug 1666216 - Enable ScopedLogExtraInfo logging. r=dom-workers-and-storage-reviewers,janv 2020-09-30 08:24:18 +00:00
ThreadSafeWeakPtr.h Bug 1687391 - Avoid using a spinlock in ThreadSafeWeakReference, r=glandium,mccr8,Gankra,sg 2021-02-03 17:00:04 +00:00
ToString.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TsanOptions.h no bug - TSan library excludes miss libdconfsettings. r=Gankro 2020-10-14 19:35:24 +00:00
Tuple.h Bug 1345842 - Add Ignore to allow ignore elements in Tie. r=froydnj 2020-03-31 12:36:22 +00:00
TypeTraits.h Bug 1625138 - Part 40: Replace remaining mozilla::IsSame with std::is_same. r=froydnj 2020-03-28 13:57:21 +00:00
TypedEnumBits.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
Types.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-21 14:13:44 +00:00
UniquePtr.h Bug 1677409 - MOZ_ASSERT(not null) in UniquePtr::operator* - r=sg 2020-11-16 20:11:24 +00:00
UniquePtrExtensions.cpp Bug 1534780 - Move ipc::FileDescriptor's UniquePtr instance into MFBT as UniqueFileHandle. r=froydnj 2019-06-28 19:46:58 +00:00
UniquePtrExtensions.h Bug 1519636 - Reformat recent changes to the Google coding style r=andi 2020-07-04 09:38:43 +00:00
Unused.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
Unused.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
Utf8.cpp Bug 1490601 part 2 - Move C++ entry points to encoding_c_mem to mfbt/. r=jwalden 2019-09-18 08:26:34 +00:00
Utf8.h Bug 1519636 - Automatically reformat recent changes using clang-format r=Ehsan 2020-01-21 09:51:27 +00:00
Variant.h Bug 1500811 - Variant::as()&&, match()&& - r=sg 2020-12-02 00:17:46 +00:00
Vector.h Bug 1665462 - Add moving Vector::appendAll(Vector&&) overload. r=jwalden 2020-10-29 19:41:43 +00:00
WeakPtr.h Bug 1672072 - P12. Add constructor for WeakPtr(RefPtr). r=sg 2020-11-13 04:21:17 +00:00
WindowsVersion.h Bug 1684110 - Stop using some 'A'-functions in mfbt/. r=dmajor 2021-01-04 14:40:48 +00:00
WrappingOperations.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
XorShift128PlusRNG.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
fallible.h Bug 1668421 - Fix a commeint in fallible.h r=glandium 2020-10-05 00:50:31 +00:00
moz.build Bug 1682604 - Update lz4 to 1.9.3. r=sg 2021-01-19 14:13:47 +00:00