Avoid deadlock in moz_container_wayland_add_initial_draw_callback()
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox105 | --- | fixed |
People
(Reporter: stransky, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
See https://bugzilla.mozilla.org/show_bug.cgi?id=1780190#c1
moz_container_wayland_add_initial_draw_callback() can cause deadlock.
Assignee | ||
Comment 1•2 years ago
|
||
With this patch moz_container_wayland_surface_lock() always locks MozContainer and needs to be paired with moz_container_wayland_surface_unlock() even if it fails and returns nullptr.
Split moz_container_wayland_add_initial_draw_callback() to two new functions:
-
moz_container_wayland_add_initial_draw_callback_locked() is called on locked container and only adds draw callback.
It asserts when MozContainer is already to draw as we don't expect it. -
moz_container_wayland_add_or_fire_initial_draw_callback() is called on unlocked container as it has it's own lock.
It behaves as original moz_container_wayland_add_initial_draw_callback(), i.e. stores draw callback when MosContainer is not visible
and fires draw callback when we're ready to draw.
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/d2c2f810bf14 [Wayland] Call moz_container_wayland_add_initial_draw_callback() on locked container, always lock MozContainer for access r=rmader
Comment 3•2 years ago
|
||
bugherder |
Backout by bszekely@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/856755f2ddc6 Backed out changeset d2c2f810bf14 for causing Bug 1780679 a=backout
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/e4b5b93592b0 [Wayland] Implement RAII class MozContainerSurfaceLock to get&lock wl_surface of moz_container r=rmader
Comment 8•2 years ago
|
||
Backed out for causing build bustages on MozContainerWayland.h
Comment 10•2 years ago
|
||
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/26adc3b79354 [Wayland] Implement RAII class MozContainerSurfaceLock to get&lock wl_surface of moz_container r=rmader
Comment 11•2 years ago
|
||
bugherder |
Assignee | ||
Comment 12•2 years ago
|
||
Failed to land.
Updated•2 years ago
|
Assignee | ||
Comment 13•2 years ago
|
||
Okay, looks fixed.
Assignee | ||
Updated•2 years ago
|
Description
•