GNOME Bugzilla – Bug 672073
Add cancellable objects to the users of the history service
Last modified: 2012-06-13 15:25:52 UTC
This allows us to avoid surprises if one of the history queries is still ongoing during shutdown. Aditionally, we can use the cancellable to abort retrieval of results in the completion model, if the users is typing already a new search term.
Created attachment 209737 [details] [review] ephy-history-window: cancel history operations during dispose To avoid surprises if the history-window happens to be destroyed.
Created attachment 209738 [details] [review] ephy-completion-model: use a cancellable with the history service For two things: first, cancel pending operations if a new search term is given before this is complete and, second, to cancel any operation remaining during the model disposal.
Wot to do wit dis.
Review of attachment 209737 [details] [review]: OK.
Review of attachment 209738 [details] [review]: Excuse my ignorance, but is it needed to destroy the object each time? Can't we just cancel the cancellable?
(In reply to comment #5) > Review of attachment 209738 [details] [review]: > > Excuse my ignorance, but is it needed to destroy the object each time? Can't we > just cancel the cancellable? That won't work fine I think, the docs for g_cancellable_reset() say "If cancellable is currently in use by any cancellable operation then the behavior of this function is undefined." So we can't, as far as I understand, just cancel and reuse the cancellable.
Review of attachment 209738 [details] [review]: OK then.
Attachment 209737 [details] pushed as 59c27f3 - ephy-history-window: cancel history operations during dispose Attachment 209738 [details] pushed as 14e7958 - ephy-completion-model: use a cancellable with the history service