Delay crashing the main process when running Out-of-Memory (OOM)
void mozalloc_handle_oom(size_t size) {
if (gOOMDelayedCrash) {
gOOMDelayedCrash = false;
Sleep(100); // Sleep for 100ms hoping some other process dies
return;
}
// The rest behaves like it used to
…
}
