During content-process shutdown an IdleTaskRunner can re-dispatch itself through immediate idle dispatch (Run -> Schedule -> TaskController::AddTask -> Run ...). The shutdown event-loop drains in ShutdownXPCOM and nsThreadManager::ShutdownNonMainThreads keep running that task while the idle deadline is stale, so it reschedules right away and spins the main thread. On macOS the parent's shutdown watchdog then force-crashes the still-busy child, which shows up in CI as the intermittent "application crashed [@ mach_msg2_trap]" signature and leakcheck "missing output line for total leaks!" failures on macOS 15 aarch64 debug, concentrated in the cross-origin variant that tears down many content processes.
Cancel the runner in Schedule() once we are in or beyond XPCOMShutdownThreads. Idle tasks are best-effort and serve no purpose that late in shutdown, and stopping them here prevents the runaway rescheduling that hangs the process.
Differential Revision: https://phabricator.services.mozilla.com/D310968