Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 2fd2c39

Browse files
committed
Bug 1687212 [Wayland] Set mAttached flag before wl_surface_commit() to avoid potential race condition, r=jhorak, a=pascalc
Differential Revision: https://phabricator.services.mozilla.com/D104045
1 parent 80b75bc commit 2fd2c39

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

widget/gtk/WindowSurfaceWayland.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@ void WindowBackBuffer::Attach(wl_surface* aSurface) {
379379

380380
wl_buffer* buffer = GetWlBuffer();
381381
if (buffer) {
382+
mAttached = true;
382383
wl_surface_attach(aSurface, buffer, 0, 0);
383384
wl_surface_commit(aSurface);
384385
wl_display_flush(WaylandDisplayGetWLDisplay());
385-
SetAttached();
386386
}
387387
}
388388

widget/gtk/WindowSurfaceWayland.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class WindowBackBuffer {
5555
void Attach(wl_surface* aSurface);
5656
void Detach(wl_buffer* aBuffer);
5757
bool IsAttached() { return mAttached; }
58-
void SetAttached() { mAttached = true; };
5958

6059
void Clear();
6160
bool Create(int aWidth, int aHeight);

0 commit comments

Comments
 (0)