Bug 1794284 [Wayland] Check critical Wayland interfaces on startup r=rmader

Differential Revision: https://phabricator.services.mozilla.com/D158955
This commit is contained in:
stransky 2022-10-11 20:10:00 +00:00
parent 51fc6b95d1
commit 26291a4850

View File

@ -295,6 +295,13 @@ nsWaylandDisplay::nsWaylandDisplay(wl_display* aDisplay)
wl_display_roundtrip(mDisplay);
}
wl_registry_destroy(registry);
// Check we have critical Wayland interfaces.
// Missing ones indicates a compositor bug and we can't continue.
MOZ_DIAGNOSTIC_ASSERT(GetShm(), "We're missing shm interface!");
MOZ_DIAGNOSTIC_ASSERT(GetCompositor(), "We're missing compositor interface!");
MOZ_DIAGNOSTIC_ASSERT(GetSubcompositor(),
"We're missing subcompositor interface!");
}
nsWaylandDisplay::~nsWaylandDisplay() {