[cross-posting to stability]
We now leverage the Windows Error Reporting service to capture crashes
that elude our regular crash reporting machinery. nightly's crash rate
will go up in the coming days but just because we now know about those
crashes; so don't worry it's a good thing!
I discovered a way to leverage the API used to interact with the Windows
Error Reporting (WER)  service to intercept crashes that were eluding
our exception handler. This includes many forms of OOM crashes, issues
that badly corrupted the stack or heap, weird DLL injections and even
__fastfail()  crashes.
The implementation involves deploying a DLL with WER-specific hooks that
are called when Firefox crashes. We leverage the hooks to capture a
minidump of the crashed process, generate a minimal set of crash
annotations and launch the crash reporter client to notify the user.
This currently only supports parent process crashes. I'll add child
process interception in the coming weeks, progress can be tracked at bug
If you're curious you can find the various bits of the implementation
(in Rust) in bug 1682509 , bug 1682514 , bug 1682511  and bug
1682516 . Beware that it's doing hacky-wacky Windows things to
achieve its goal; don't expect elegant stuff :-P
Interestingly it seems that we're the first to be able to intercept
__fastfail() crashes. Looking for info on the topic I found posts,
tweets and even bugs on Chromium's tracker that unanimously mentioned it
couldn't be done. My guess is that Microsoft changed how the system
works since the last time someone tried.
 Use the Windows Error Reporting API to generate minidumps for
crashes which cannot be caught using Breakpad
 Write a WER runtime exception module capable of writing out minidumps
 Register the WER runtime exception module at runtime
 Record the WER runtime exception module in the Windows registry
 Make the WER runtime exception module launch the crash reporter
client when the browser crashes