Bug 1757568 [Wayland] Always clear wayland frame callback in moz_container_wayland_frame_callback_handler() r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D141936
This commit is contained in:
stransky 2022-03-24 10:38:26 +00:00
Родитель a801665d19
Коммит 7faf5c7a64
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -244,6 +244,7 @@ static void moz_container_wayland_frame_callback_handler(
{
// Protect mozcontainer internals changes by container_lock.
MutexAutoLock lock(*wl_container->container_lock);
g_clear_pointer(&wl_container->frame_callback_handler, wl_callback_destroy);
// It's possible that container is already unmapped so quit in such case.
if (!wl_container->surface) {
LOGWAYLAND(" container in unmapped, quit.");
@ -251,7 +252,6 @@ static void moz_container_wayland_frame_callback_handler(
"MozContainer should be unmapped.");
return;
}
g_clear_pointer(&wl_container->frame_callback_handler, wl_callback_destroy);
if (wl_container->ready_to_draw) {
return;
}