Detach subsurfaces when hiding by removing the subsurface object.
This allows us to reattach the subsurface to another parent surface,
i.e. another window, and/or recycle the subsurface within a surface pool.
Recycling subsurfaces is until now a quite rare thing in the Wayland
world. Thus adding it to the example-compositor allows to stress-
test Wayland compositors.
Depends on D110745
Differential Revision: https://phabricator.services.mozilla.com/D110863
This is a minimal implementation of a WER exception module that can intercept
crashes of Firefox processes and write out a fully formed crash report, that is
a minidump, an .extra file containing the minimum annotations required by
Socorro and an event file.
The module in and by itself is not functional: an entry needs to be added to
the registry and the processes which want to be monitored need to register it
at runtime. With this patch applied it will only be built but it won't be
packaged with Firefox nor it will be used when doing local development.
The module implementation has a few notable properties:
* We use an empty C++ shim (mozwer) to build the module DLL. This is
because the build system doesn't support building DLLs directly from Rust.
* The actual implementation is written in Rust (mozwer-rust) and exposes the
callbacks that will be invoked by the WER service.
* We use the winapi crate to access Windows native functionality but given it
is missing some bits (including upstream!) we declare them in our crate for
the time being.
* The minidump uses the same options we use in Firefox and should be of
similar size. I manually tested different type of crashes including
__fastail() ones and they're all reliably captured.
* The .extra file contains only the annotations that are strictly required for
submitting the crash to crash-stats.mozilla.org. More should be added in the
future. The existing annotations are all extracted from within the module
code because we have no way to access the ones that were stored in Firefox'
crashed processes (nor should we, since we hope to catch crashes that happen
even before Firefox sets up crash reporting internally).
* The module does not distinguish between main process and content process
crashes at the moment. This will need to be implemented when we hook it up
with the crash reporting code within Firefox.
* We use libc's time() function to get the crash time in order to be consistent
with what the regular exception handler does.
Differential Revision: https://phabricator.services.mozilla.com/D101708
We only need to react to a completed captive portal check when the captive
portal was previously locked. When not in a captive portal, this notification
only means the check has completed - no network properties have changed.
Differential Revision: https://phabricator.services.mozilla.com/D109723
A TRR request is created and dispatched to the handling thread.
If we want to cancel it, we may do so before the runnable has been handled
and there's no HTTP channel - so the cancel was a NO-OP.
Here we add mCancelled which is consulted in SendHTTPRequest to check
if the request has already been cancelled.
Differential Revision: https://phabricator.services.mozilla.com/D109590
This patch consists of the changes generated by running
`./mach static-analysis check --fix` on `netwerk/dns` after adding the
`modernize-use-default-member-init` clang-tidy lint.
Some additional changes were made by hand to ensure consistent results.
This patch ensures that all member variables are initialized in the header,
so when adding or changing constructors we don't miss one resulting in
uninitialized memory.
Differential Revision: https://phabricator.services.mozilla.com/D109339
The reason this worked previously is that we initialized `recPtr = rec;` in
the for loop iterating through callbacks.
Records that were in the evictionQ did not have any callbacks, so we never
entered this block.
Differential Revision: https://phabricator.services.mozilla.com/D109338
We don't use it there. This allows the example compositor to be run
on compositors that don't yet support wp_viewporter such as kwin,
even if only in non-native mode.
Differential Revision: https://phabricator.services.mozilla.com/D110745
When allocating a plain object with no reserved slots, the information that we need from the template object is minimal: the shape, the AllocKind, and the number of fixed/dynamic slots. To make it possible to share code between NewObject ICs, this patch reads the relevant information out of the template object in NewObjectIRGenerator and encodes it into the CacheIR. We generate code using a new masm function that effectively inlines `initGCThing` and `initGCSlots` into `createGCObject`.
Conveniently, every `JSOp::NewObject` is a plain object with no reserved slots, so this patch reduces the total number of baseline ICs compiled by 2/3. In a future patch we can get rid of NewObjectIRGenerator::tryAttachTemplateObject completely.
The old code didn't support dynamic slots. It's simple enough that I just went ahead and implemented it. In a quick browser experiment, ~8-10% of NewObject ICs had dynamic slots. To limit the length of the unrolled loop, I capped support at 16, which covers ~2/3 of cases with dynamic slots. (Because we always initialize the entire capacity, which is always a power of 2, this just means we support 16 fixed + 7 dynamic, and 16 fixed + 15 dynamic.) We could also consider a follow-up patch that generates an actual loop for dynamic slots and removes the cap.
Differential Revision: https://phabricator.services.mozilla.com/D110341
PresShell::SetIsActive(/* aIsActive */ true) does not directly trigger rendering. On Android, there is a case that rendering of about:support is not updated when PresShell::SetIsActive(true) call is slow during Tab switch.
Differential Revision: https://phabricator.services.mozilla.com/D110682
This expands on an earlier fix from bug 1698009. It turns out we can occasionally find
YUV values which can still produce negative RGB values if only Y is clamped. The final
solution to this is just to clamp the output RGB values rather than input YUV values.
Since this is only used when we fall off the SWGL fast-paths (which properly handle
this clamping already), the performance impact of the extra clamping should be negligible.
Differential Revision: https://phabricator.services.mozilla.com/D111032