After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 672073 - Add cancellable objects to the users of the history service
Add cancellable objects to the users of the history service
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-14 15:15 UTC by Claudio Saavedra
Modified: 2012-06-13 15:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ephy-history-window: cancel history operations during dispose (2.85 KB, patch)
2012-03-14 15:15 UTC, Claudio Saavedra
committed Details | Review
ephy-completion-model: use a cancellable with the history service (2.24 KB, patch)
2012-03-14 15:15 UTC, Claudio Saavedra
committed Details | Review

Description Claudio Saavedra 2012-03-14 15:15:15 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.
Comment 1 Claudio Saavedra 2012-03-14 15:15:17 UTC
Created attachment 209737 [details] [review]
ephy-history-window: cancel history operations during dispose

To avoid surprises if the history-window happens to be destroyed.
Comment 2 Claudio Saavedra 2012-03-14 15:15:20 UTC
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.
Comment 3 Claudio Saavedra 2012-06-13 08:07:40 UTC
Wot to do wit dis.
Comment 4 Xan Lopez 2012-06-13 11:08:07 UTC
Review of attachment 209737 [details] [review]:

OK.
Comment 5 Xan Lopez 2012-06-13 11:15:49 UTC
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?
Comment 6 Claudio Saavedra 2012-06-13 12:38:44 UTC
(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.
Comment 7 Xan Lopez 2012-06-13 14:12:12 UTC
Review of attachment 209738 [details] [review]:

OK then.
Comment 8 Claudio Saavedra 2012-06-13 15:25:47 UTC
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