We don't know why we see initialization failures in the telemetry which
makes it hard to investigate why users aren't getting WebRender and
instead fallback to basic. Let's expose the detailed error message
WebRender already generates and puts in the critical log.
Differential Revision: https://phabricator.services.mozilla.com/D89185
The profiler should guarantee that TLS initializations are done only once (from `profiler_init()`), so there is no need to potentially do it at every TLS access.
Instead, the initialization functions set the TLS states once (to `Initialized` or `Unavailable`, depending on the underlying TLS initialization success), and later accesses to this effectively-read-only flag can be done without thread synchronization.
This reduces the generated code size.
There are also DEBUG-build checks that no accesses are done before initialization; this is theoretically racy, but it's only used to detect too-early accesses in DEBUG builds, which should never happen anyway.
Differential Revision: https://phabricator.services.mozilla.com/D89338
It's never set to anything other than the default, so we can hardwire it as a
constant.
`GlyphCache::max_bytes_used` is also removed.
Depends on D89101
Differential Revision: https://phabricator.services.mozilla.com/D89102
It has a single impl, `GpuProfileTag`, so it's unnecessary generalisation.
This also removes type parameter from `GpuTimer`, `GpuSampler`,
`GpuFrameProfile`, and `GpuProfiler`.
Depends on D89099
Differential Revision: https://phabricator.services.mozilla.com/D89100
When generating a hang report we need to force a hung child process to return
its annotation via the pipe that connects it to the main process. Since the
child is not responding to regular IPC messages we force it to using
platform-specific code:
* On Windows we launch a new thread using CreateRemoteThread() that will
invoke the code used to send the crash annotations. The Windows-specific
code also has another slight modification: it stored the pipe used to send
the annotations in Breakpad's minidump callback context. This patch moves it
into the `gChildCrashAnnotationReportFd` global which is what all the other
platforms use.
* On Linux/macOS we use a signal handler for the SIGTERM signal. It would be
simpler to use SIGUSR1 or another signal that doesn't have special meanings,
but those are all already in use in Gecko (either by jprof or the gcov
machinery). We don't install SIGTERM handlers for anything else but
obvioulsy its semantics get in the way since it's used to politely kill a
process, and Chromium IPC also uses it for that purpose. So to tell apart
our use of SIGTERM from a "regular" terminating SIGTERM we send a magic
value along using sigqueue(). Our signal handler will look for it and only
send annotations when it is set. If the magic number isn't there it will
re-install the default SIGTERM handler and raise the signal once more which
will lead to the process being terminated as it should be.
The patch refactors some of the code so that the PIDs and process/file handles
use platform-independent types to cut down on the amount of duplication we
have there.
Differential Revision: https://phabricator.services.mozilla.com/D87759
This moves the special cases to the printing platform code instead
(where it belongs).
The SupportsMonochrome() implementation is the only thing that I found
to work for the "Microsoft Print to PDF" driver, but other similar
drivers like XPS still claim to support monochrome (even though it's not
true). This should avoid the UI getting in a bad state as described in
the bug though, so may be better?
Depends on D89306
Differential Revision: https://phabricator.services.mozilla.com/D89312
There is a race condition in the "WebDriver:SwitchToWindow" command
that would throw an UnknownError instead of NoSuchWindowError when
the window gets closed at the same time as the command gets called.
Differential Revision: https://phabricator.services.mozilla.com/D89377
A session is defined as string in CDP but target specific commands
and events currently return a number based on the last used index.
This also makes it very easy to discover active sessions.
Differential Revision: https://phabricator.services.mozilla.com/D89352
So what's going on here is that there are pseudo-elements that contain
stuff like content: "Note" or content: "Example".
So when you're searching for "entry", we find the `e`, and then all the
text nodes afterwards are of course in a different subtree... So we end
up ignoring them, but after having iterated through all the DOM first.
To avoid this, change a bit the code so that we check for different
blocks _before_ checking for different subtrees. There's no point to
keep matching once you're done with a block.
Differential Revision: https://phabricator.services.mozilla.com/D89365