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
Alignment.h
AllocPolicy.h
AlreadyAddRefed.h
Array.h
ArrayUtils.h
Assertions.cpp
Assertions.h
AtomicBitfields.h
Atomics.h
Attributes.h
BinarySearch.h
BitSet.h Bug 1686219 - Add BitSet::SetAll and ResetAll methods r=heycam 2021-01-20 10:03:53 +00:00
BloomFilter.h
Buffer.h
BufferList.h
Casting.h
ChaosMode.cpp
ChaosMode.h
Char16.h
CheckedInt.h
CompactPair.h
Compiler.h
Compression.cpp
Compression.h
DbgMacro.h
DebugOnly.h
DefineEnum.h
DoublyLinkedList.h
EndianUtils.h
EnumeratedArray.h
EnumeratedRange.h
EnumSet.h
EnumTypeTraits.h
fallible.h
FastBernoulliTrial.h
FloatingPoint.cpp
FloatingPoint.h Bug 1687441 part 7 - Add NumberEqualsInt64 and NumberIsInt64 to MFBT. r=sg 2021-01-27 15:52:29 +00:00
FStream.h
FunctionRef.h
FunctionTypeTraits.h
HashFunctions.cpp
HashFunctions.h
HashTable.h Bug 1687428 - Part 28: Store TaggedParserAtomIndex in ParserAtomsTable. r=nbp 2021-01-29 19:43:02 +00:00
HelperMacros.h
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
IntegerRange.h
IntegerTypeTraits.h
JSONWriter.cpp
JSONWriter.h
JsRust.h
Latin1.h
Likely.h
LinkedList.h
MacroArgs.h
MacroForEach.h
MathAlgorithms.h
Maybe.h
MaybeOneOf.h
MemoryChecking.h
MemoryReporting.h
moz.build Bug 1682604 - Update lz4 to 1.9.3. r=sg 2021-01-19 14:13:47 +00:00
NonDereferenceable.h
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
OperatorNewExtensions.h
PairHash.h
Path.h
PodOperations.h
Poison.cpp
Poison.h
RandomNum.cpp
RandomNum.h
Range.h
RangedArray.h
RangedPtr.h
ReentrancyGuard.h
RefCounted.h Bug 1687391 - Avoid using a spinlock in ThreadSafeWeakReference, r=glandium,mccr8,Gankra,sg 2021-02-03 17:00:04 +00:00
RefCountType.h
RefPtr.h
Result.h
ResultExtensions.h
ResultVariant.h
ReverseIterator.h
RollingMean.h
Saturate.h
Scoped.h
ScopeExit.h
SegmentedVector.h
SHA1.cpp
SHA1.h
SharedLibrary.h
SmallPointerArray.h
Span.h
SplayTree.h
Sprintf.h
SPSCQueue.h
StaticAnalysisFunctions.h
STYLE
TaggedAnonymousMemory.cpp
TaggedAnonymousMemory.h
Tainting.h
TemplateLib.h
TextUtils.h
ThreadLocal.h
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
TsanOptions.h
Tuple.h
TypedEnumBits.h
Types.h
TypeTraits.h
UniquePtr.h
UniquePtrExtensions.cpp
UniquePtrExtensions.h
Unused.cpp
Unused.h
Utf8.cpp
Utf8.h
Variant.h
Vector.h
WeakPtr.h
WindowsVersion.h Bug 1684110 - Stop using some 'A'-functions in mfbt/. r=dmajor 2021-01-04 14:40:48 +00:00
WrappingOperations.h
XorShift128PlusRNG.h