gecko-dev/ipc
Gabriele Svelto 1a86d1dee4 Bug 1697895 - Register the WER runtime exception module in child processes r=KrisWright
This patch sets up a few different things that will be used by the WER runtime
exception module when it needs to notify the main process of a child process
crash.

For every child process we allocate a structure in the main process called
WindowsErrorReportingData that contains three things:
- The address of the function used to notify the main process that there's a
  pending minidump for a given child process
- The PID of said child process
- The name of the minidump that has been generated

The first field is filled up by the main process and will be read by the WER
process when running the runtime exception module, the second and third fields
on the other hand start empty and will be written into by the runtime exception
module after it has generated a minidump.

I know this sounds scary. It is. But bear with me please.

When we register the runtime exception module we can pass it a single
pointer-sized parameter but we need to pass it at least another pointer that
includes data coming from the child process itself (this one is called
InProcessWindowsErrorReportingData). This data currently includes only the
process type but will also include certain annotations in the future
(e.g. bug 1711418). So here's what we do: we store a pointer to the parent
data structure in the child process command-line (cringe) and we read it
from the runtime exception module by reading the crashed process command-line
arguments and parsing them (double-cringe).

Armed with this information the WER runtime exception module can populate
the info for the generated minidump and then push it into the main process
by calling CreateRemoteThread() (which creates a new thread in the main
process, triple-cringe at this point).

Differential Revision: https://phabricator.services.mozilla.com/D115379
2021-06-10 22:01:32 +00:00
..
app Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium 2021-02-23 23:25:22 +00:00
chromium Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
contentproc
glue Bug 1697895 - Register the WER runtime exception module in child processes r=KrisWright 2021-06-10 22:01:32 +00:00
gtest
ipdl Bug 1708042, add support for 'control' priority in ipdl, r=jld,ipc-reviewers 2021-05-21 15:46:46 +00:00
mscom Backed out 4 changesets (bug 1707954) for causing bc failures in ClearOnShutdown.cpp. 2021-06-10 09:13:45 +03:00
testshell Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8 2021-03-05 15:29:49 +00:00
moz.build
pull-chromium.py