`High` priority is being used for vsync tasks, so we should rename it to
make it clear, and renaming it also makes our priority naming less
confusing.
Differential Revision: https://phabricator.services.mozilla.com/D109536
The patches on this bug make bug 1684441 increase in frequency. Presumable ASAN
shutdown is in many cases already close to the timeout, and this bug is making
it trip over the edge.
A 4 minute timeout made a broad linux x64 ASAN try run go from five occurrences
of bug 1684441 to two, whereas a 5 minute timeout made them go to zero.
Differential Revision: https://phabricator.services.mozilla.com/D109785
It's unclear whether this bug fixes the leaks that prompted this leak threshold,
or whether they were already fixed. It is however clear that mochitests now run
without leaking.
Differential Revision: https://phabricator.services.mozilla.com/D109784
When mTargetThread is WebSocketImpl it must be released on main since it
implements nsISupportsWeakReference, and clearing weak references is not
threadsafe.
Differential Revision: https://phabricator.services.mozilla.com/D109783
This adds support for nsIDelayedRunnableObserver to nsStreamTransportService.
This is a bit special because nsStreamTransportService uses an nsThreadPool.
Because of race conditions we cannot dispatch a final cleanup task to cancel any
pending DelayedRunnables.
Because of the inherent raciness of threads in the thread pool we assume that
any pending DelayedRunnables can handle being released on any thread. Thus we
dispatch the cleanup task to the background event target once the thread pool
has been shut down and processed all its events. This ensures no races can occur
between the cleanup task and OnDelayedRunnableScheduled.
Differential Revision: https://phabricator.services.mozilla.com/D109782
Because DelayedRunnables are fire-and-forget, there is no way for a targeted
EventTarget to clean them up on shutdown. Thus if a timer fires after
EventTarget shutdown it will fail to dispatch the timer event, and avoid
releasing the timer callback because it's not on the targeted thread. This
causes a leak as there is a ref-cycle between nsTimerImpl::mCallback and
DelayedRunnable::mTimer.
This patch adds nsIDelayedRunnableObserver for a target to observe which
DelayedRunnables are relying on their timer to run them. This allows the target
to schedule a shutdown task to cancel those timers and release the runnables on
the target thread.
Supported DelayedRunnable targets with this patch are TaskQueues,
eventqueue-based nsThreads and XPCOMThreadWrappers that wrap a supported
nsThread.
An assertion makes sure at runtime that future new uses of DelayedRunnable
target nsIDelayedRunnableObserver-supported event targets.
Differential Revision: https://phabricator.services.mozilla.com/D109781
See bug 1698132 about why the media features are better (ltdr, they're
faster, easier to write, and don't need a restart to handle dynamic
changes).
Differential Revision: https://phabricator.services.mozilla.com/D110919
I am not super happy with having to do `Rooted<PropertyDescriptor> desc(cx, *desc_);` in DebuggerObject::getOwnPropertyDescriptor.
However PropertyDescriptor::value() can't be resolved properly, unlike MutableHandle<PropertyDescriptor>::value().
I wonder if Maybe could return Handle/MutableHandle as well somehow.
Differential Revision: https://phabricator.services.mozilla.com/D110663
This turned out to be a bit more work than expected because we were missing
branch32/branchPtr implementations taking a BaseIndex and a Register.
Depends on D110253
Differential Revision: https://phabricator.services.mozilla.com/D110254
We currently get the jsid from the property's shape, but in a later patch that
Shape* argument will be replaced with a GetterSetter* argument.
I considered using PropertyKey instead of jsid, but this matches similar code
using jsid.
Depends on D110252
Differential Revision: https://phabricator.services.mozilla.com/D110253
After bug 1697607 and the subsequent pref removal this code only runs in
the parent process.
After bug 1699088 the caller takes care of caching. So there should be
no need to cache stuff ourselves.
Differential Revision: https://phabricator.services.mozilla.com/D110871
There's no reason we can't just query LookAndFeel and we need to use
sSystemMetrics. In the past, LookAndFeel queries were not cached, but
this is no longer the case, so perf wise should be pretty equivalent.
Note that we don't need the NS_SUCCEEDED checks because the default
value from GetInt if the platform doesn't support it is 0 anyways.
Differential Revision: https://phabricator.services.mozilla.com/D110805
- Rename nsAciiMask.h details:: namespace to asciimask_details so it doesn't clash with ipc/chromium/src/base/task.h
- Add SetSpecAndFilterWhitespace simple URI constructor that filters whitespace instead of just CR/LF.
- Only do one scan of the string in nsSimpleURI::SetPathQueryRefInternal in order to find the end of the path, query & ref.
There are probably more optimizations possible.
In my testing these get me a 1.5x-2x speedup.
Differential Revision: https://phabricator.services.mozilla.com/D107567
This may happen when a TransportSetup retry to connect using a different IP address, but AsyncResolveNative failed.
The change adds a flag that indicates whether it is needed to remove a connection from mNumActiveConns. This should make sure that we do not do it multiple times.
Differential Revision: https://phabricator.services.mozilla.com/D110723
This reorganizes the blendTextureLinear code so that linear-repeat filtering
can reuse the linear filtering fast-paths. Otherwise, linear-repeat filtering
would previously only use the linear filtering fallback, when some patterns
like repeating background images are easily accelerated by these extra fast-paths.
Differential Revision: https://phabricator.services.mozilla.com/D110877
This modifies both Breakpad's minidump_stackwalk and minidump_dump
tools as well as the minidump-analyzer so that they will always print
out the list of unloaded modules when processing minidumps where it is
populated.
Differential Revision: https://phabricator.services.mozilla.com/D110415
This does several things, including:
- Reduces the timeout in case a pixel doesn't match from full test timeout to
30 seconds.
- Reduces the log spam when a pixel doesn't match to only write the last color
checked instead of every check (once per second). This writes the last color
also when passing for completion in logs.
- Stops tracks and exits fullscreen before logging a failure, meaning the
constraints-scaled image becomes visible in the screenshot from try.
- Increases the size of the video element showing the screensharing video track,
so that pixel check failures are easy to confirm in screenshots from try.
Differential Revision: https://phabricator.services.mozilla.com/D110407
Prior to this patch various failure paths, e.g., runTest() from
mediaStreamPlayback.js would call SimpleTest.finish() twice.
This patch fixes this so no path will call finish only on failure (and not on
success) to make responsibilities clear. This applies to PeerConnectionTest.run
and runTestWhenReady.
runTestWhenReady will be in charge of calling finish for all paths through the
test framework. Its callers runTest and runNetworkTest will stop calling finish.
The responsibility for calling networkTestFinished is moved from
PeerConnectionTest.run to runNetworkTest since the latter calls
startNetworkAndTest which is the analogous start function. At the same time,
networkTestFinished stops calling through to finish since that is now the
responsibility of runTestWhenReady.
All users of the relevant APIs are updated to comply. In many cases related code
is modernized and cleaned up to support the new pattern and to improve
readability.
Differential Revision: https://phabricator.services.mozilla.com/D110405