1
0
Fork 0
firefox/toolkit/crashreporter/test/unit/crasher_subprocess_tail.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

20 lines
428 B
JavaScript

/* import-globals-from crasher_subprocess_head.js */
// Let the event loop process a bit before crashing.
if (shouldDelay) {
let shouldCrashNow = false;
Services.tm.dispatchToMainThread({
run: () => {
shouldCrashNow = true;
},
});
Services.tm.spinEventLoopUntil(
"Test(crasher_subprocess_tail.js:shouldDelay)",
() => shouldCrashNow
);
}
// now actually crash
CrashTestUtils.crash(crashType);