Bug 1654477 P4: Add pref to crash the browser if the GPU process crashes for testing. r=jrmuizel

Differential Revision: https://phabricator.services.mozilla.com/D93673
This commit is contained in:
Bob Owen 2020-10-16 10:38:40 +00:00
parent b3c7e50da6
commit 44cb4850da
2 changed files with 9 additions and 0 deletions

View File

@ -555,6 +555,10 @@ void GPUProcessManager::NotifyListenersOnCompositeDeviceReset() {
void GPUProcessManager::OnProcessUnexpectedShutdown(GPUProcessHost* aHost) {
MOZ_ASSERT(mProcess && mProcess == aHost);
if (StaticPrefs::layers_gpu_process_crash_also_crashes_browser()) {
MOZ_CRASH("GPU process crashed and pref is set to crash the browser.");
}
CompositorManagerChild::OnGPUProcessLost(aHost->GetProcessToken());
DestroyProcess();

View File

@ -5430,6 +5430,11 @@
value: 5000
mirror: once
- name: layers.gpu-process.crash-also-crashes-browser
type: bool
value: false
mirror: always
- name: layers.low-precision-buffer
type: RelaxedAtomicBool
value: false