Merge branch 'mjog/766-search-deadlock' into 'mainline'

ConversationWebView: Avoid a deadlock cancelling search highlighting

Closes #766

See merge request GNOME/geary!486
This commit is contained in:
Michael Gratton 2020-04-04 02:27:12 +00:00
commit 99730af3ce

View file

@ -128,7 +128,10 @@ public class ConversationWebView : ClientWebView {
callback();
});
ulong cancelled_handler = cancellable.cancelled.connect(() => {
callback();
// Do this at idle since per the docs for
// GLib.Cancellable.disconnect, disconnecting a
// handler from within a handler causes a deadlock.
GLib.Idle.add(() => callback());
});
controller.search(