Bug 1792091 [Wayland] Assert when shm interface is missing r=emilio

There are some suspect crashes around Wayland SHM interface so let's make sure we have valid shm handle before we pass it to Wayland.
It covers the 'It can't happen' scenario which tends to happen despite of all premises.

Differential Revision: https://phabricator.services.mozilla.com/D157975
This commit is contained in:
stransky 2022-09-23 06:19:28 +00:00
Родитель a82e48e896
Коммит daf65b6eb5
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -117,6 +117,7 @@ RefPtr<WaylandShmPool> WaylandShmPool::Create(
return nullptr;
}
MOZ_DIAGNOSTIC_ASSERT(aWaylandDisplay->GetShm(), "Missing Shm!");
shmPool->mShmPool =
wl_shm_create_pool(aWaylandDisplay->GetShm(), shmPool->mShmPoolFd, aSize);
if (!shmPool->mShmPool) {