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•3 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.
Comment 3•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Comment 8•3 years ago
|
||
Backed out for causing build bustages on MozContainerWayland.h
Comment 10•3 years ago
|
||
Comment 11•3 years ago
|
||
bugherder |
Assignee | ||
Comment 12•3 years ago
|
||
Failed to land.
Updated•3 years ago
|
Assignee | ||
Comment 13•3 years ago
|
||
Okay, looks fixed.
Assignee | ||
Updated•3 years ago
|
Description
•