MakeAndAddRef exists partly to serve as syntactic sugar to combine statements
like this. And this lets us reduce our count of manual 'new' statements,
which is a nice plus.
One exception was "new StyleSheet" which has a private constructor and hence
can't use MakeAndAddRef, so in that instance I used do_AddRef(new) to stuff the
newly-allocated object into a smart pointer, in a way that we can consistently
grep for across the codebase when auditing our new/delete invocations.
Differential Revision: https://phabricator.services.mozilla.com/D298473
This is mostly just changing `new Foo()` to `MakeRefPtr<Foo>()`.
Notablye exceptions:
* In one case where the result gets stuck in a `nsCOMPtr` instead of a `RefPtr`,
I use `MakeAndAddRef` instead, to follow precedent from elsewhere in the
codebase (and avoid the appearance of a pointer-type-mixup).
* In cases where the class has a private constructor, we can't use MakeRefPtr,
so I use `do_AddRef(new Foo())` to make it slightly clearer (in an easily
greppable way) that the 'new' invocation is instantly being stuffed into
a smart pointer.
Differential Revision: https://phabricator.services.mozilla.com/D298475
Make promise resolution async, and a lot of the FontFaceSetImpl stuff
doesn't make sense anymore because FontFaceSetImpl _is_ thread-safe.
Differential Revision: https://phabricator.services.mozilla.com/D289918
We don't need it:
* For built-in sheets (ContentParent etc) the original URI is the same.
* For Document / nsStyleSheetService / LinkStyle, the original URI is
what you want to avoid registering / loading the same URI multiple
times.
Differential Revision: https://phabricator.services.mozilla.com/D269423
Remove mWorkerPrivate from WorkerMainThreadRunnable. Instead, using a ThreadSafeWorkerRef to keep Worker alive until the created syncLoop is destroyed.
In general, WorkerMainThreadRunnable::mWorkerPrivate is only used for dispatching the MainThreadStopSyncLoopRunnable back to the Worker thread. Because of the syncLoop, the Worker is supposed to be kept alive until the created syncLoop is destroyed.
RefPtr<ThreadSafeWorkerRef> WorkerMainThreadRunnable::mWorkerRef is introduced to ensure a valid WorkerPrivate during WorkerMainThreadRunnable's execution.
WorkerMainThreadRunnable::mWorkerRef is allocated just before creating a syncLoop in WorkerMainThreadRunnable::Dispatch. And released after the created syncLoop::Run() finishes.
Depends on D212556
Differential Revision: https://phabricator.services.mozilla.com/D212557
GVST is how these probes sent data in Fenix and is now unnecessary (and doesn't send data in Fenix release) since Firefox Desktop has direct access to Glean. We therefore need to clean them up in some capacity.
Following the recommendations from the GeckoView Streaming (GVST) validation effort, this is a pure Glean api implementation of the metrics that fell under network in geckoview streaming.
Each metric retains its previous name, and gains a Glean Interface for FireFox Telemetry (GIFFT) version, such that downstream data analyses will not be impacted.
Several metrics were not recorded in the current codebase and have been removed.
Differential Revision: https://phabricator.services.mozilla.com/D200400
We already account for non-rule-face dirtiness via mNonRuleFacesDirty.
If mNonRuleFaces is not empty, this would cause every stylesheet
insertion to think font faces have changed, and trigger a restyle.
Differential Revision: https://phabricator.services.mozilla.com/D189033
Now that the style system has keywords for this, we don't need to define them in gfx
but can just use the enum directly. (No functional change, just code simplification.)
Depends on D154237
Differential Revision: https://phabricator.services.mozilla.com/D154238
Now that the style system has keywords for this, we don't need to define them in gfx
but can just use the enum directly. (No functional change, just code simplification.)
Depends on D154237
Differential Revision: https://phabricator.services.mozilla.com/D154238
Now that the style system has keywords for this, we don't need to define them in gfx
but can just use the enum directly. (No functional change, just code simplification.)
Differential Revision: https://phabricator.services.mozilla.com/D154238
We do some initialization of gfxFontSrcURI and gfxFontFaceSrc that is
main thread only on the DOM worker threads. These portions of the
initialization can easily be deferred to on demand access since they are
only ever used on the main thread itself.
Differential Revision: https://phabricator.services.mozilla.com/D153461
We do some initialization of gfxFontSrcURI and gfxFontFaceSrc that is
main thread only on the DOM worker threads. These portions of the
initialization can easily be deferred to on demand access since they are
only ever used on the main thread itself.
Differential Revision: https://phabricator.services.mozilla.com/D153461
This patch splits document specific functionality from FontFaceSetImpl
into a new class FontFaceSetDocumentImpl. This will make it easier to
fork FontFaceSetImpl for workers.
Differential Revision: https://phabricator.services.mozilla.com/D147819
This patch merges FontFaceSetImpl and gfxUserFontSet into the same
class. This reduces the level of indirection and in theory makes it
easier to manage future threading issues.
Differential Revision: https://phabricator.services.mozilla.com/D147817