A custom defintion wrapping fu2::function_base is used to customize the
inline buffer's size and alignment to make it compatible with nsTArray.
Without the custom wrapper, `alignof(max_align_t)` is used, which is
larger than nsTArray's max alignment on some platforms.
Differential Revision: https://phabricator.services.mozilla.com/D145691
A custom defintion wrapping fu2::function_base is used to customize the
inline buffer's size and alignment to make it compatible with nsTArray.
Without the custom wrapper, `alignof(max_align_t)` is used, which is
larger than nsTArray's max alignment on some platforms.
Differential Revision: https://phabricator.services.mozilla.com/D145691
clang-cl doesn't define __GNUC__. Also for some reason, clang-cl doesn't
like the use of MOZ_FORMAT_PRINTF on a function definition (while clang
is apparently happy with it).
Differential Revision: https://phabricator.services.mozilla.com/D144922
Due to how this type of threadsafe refcounting is implemented, it needs to be
implemented using a MFBT-style refcounting base class, somewhat similar to
`SupportsWeakPtr`.
This patch makes NS_IMPL_{ADDREF,RELEASE}_INHERITED intelligently not add
refcount logging for types inheriting from SupportsThreadSafeWeakPtr, as the
default behaviour would break due to weak pointer upgrades not calling through
`AddRef` or `Release`.
In MFBT, the return value of `AddRef` and `Release` on
SupportsThreadSafeWeakPtr is changed to be compatible with nsISupports, so that
this type can be used to implement nsISupports refcounting.
Differential Revision: https://phabricator.services.mozilla.com/D142603
Currently calling Pattern::Clone() produces a heap-allocated Pattern with RefPtrs
to any internal resources such as SourceSurfaces or GradientStops. While this is
okay if the Pattern is transient, this causes problems if the clone is long-lived
and causes via the RefPtr the stored resource to stay alive, even when there are
no other external references to the resource.
In the case of DrawTargetWebgl's PathCache, we need to be able to create Pattern
clones that have internal weak references, while also still supporting the original
use-case of strong references. To this end we template-ize some of the Pattern
derivatives so that we can make either strong or weak versions according to use-case.
This case way we store a weak clone of a Pattern in the PathCache key, the reference
will automatically invalidate itself when all other external strong references to it
go away, without having to do external crawling of the PathCache to constantly prune
the last reference manually.
Differential Revision: https://phabricator.services.mozilla.com/D144381
There are a few places where we call one of two overloads of a fuction based on
the contents of a MaybeOneOf. We can simplify this code by giving the class a
map method.
Differential Revision: https://phabricator.services.mozilla.com/D144595
This patch creates an class managing an input-only audio stream within a
task thread. This class will be used as a source generating the audio
data to a NonNativeInputTrack in the following patch.
Depends on D116535
Differential Revision: https://phabricator.services.mozilla.com/D137911
There weren't that many uses of the existing typedef, so it seemed like
it might be worthwhile to just replace all uses of the previous typedef
with the stl-like one.
Differential Revision: https://phabricator.services.mozilla.com/D142705
This will be used to avoid problematic includes from WorkerPrivate.h,
and it matches the behavior of RefPtr<> and WeakPtr<>.
Differential Revision: https://phabricator.services.mozilla.com/D140658
This will be used to avoid problematic includes from WorkerPrivate.h,
and it matches the behavior of RefPtr<> and WeakPtr<>.
Differential Revision: https://phabricator.services.mozilla.com/D140658
* Accept that finding an explicit unpack for a given stride might fail.
* Directly use the logic from the GLES spec for unpacking stride calculations.
* Use structuredSrcSize member.
* Calc explicit unpack based on dstStride, not srcStride.
Differential Revision: https://phabricator.services.mozilla.com/D136052
These assertions are already diagnostic asserts, and this will make
failures to check Maybe into safe crashes rather than security bugs on
all branches.
A failure to check Maybe is more dangerous than a null pointer
dereference, as the generated code will produce a valid reference to
uninitialized data rather than a null reference which should safely
segfault.
Differential Revision: https://phabricator.services.mozilla.com/D138208
Adding MOZ_CRASH reasons will help disambiguate any of these crashes in crash ping telemetry (which doesn't have symbolicated crash signatures or stack traces like crash reports).
Differential Revision: https://phabricator.services.mozilla.com/D133582
* Fix update.sh to use macOS-compatible mktemp -d flag.
* Rebase use-mozilla-assertions.patch to fix merge conflict.
* Rebase debug-only-functions.patch to fix merge conflict.
* Rebase to-fixed-dbl-max.patch to fix merge conflict.
* Remove to-fixed-digits-after-point.patch because upstream has this fix now.
https://github.com/google/double-conversion/releases/tag/v3.1.6
Cleanups and new architectures:
* Features some code cleanups.
* Adds the following new architectures: loongarch, xtensa, nios2, e2k.
Differential Revision: https://phabricator.services.mozilla.com/D133581