WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
86843
[GTK] Add GCancellable parameter to all methods using gio async pattern
https://bugs.webkit.org/show_bug.cgi?id=86843
Summary
[GTK] Add GCancellable parameter to all methods using gio async pattern
Carlos Garcia Campos
Reported
2012-05-18 04:57:30 PDT
For consistency and because it's something expected and useful.
Attachments
Patch
(32.00 KB, patch)
2012-05-18 05:00 PDT
,
Carlos Garcia Campos
gustavo
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2012-05-18 05:00:38 PDT
Created
attachment 142688
[details]
Patch
WebKit Review Bot
Comment 2
2012-05-18 05:03:44 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See
http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Gustavo Noronha (kov)
Comment 3
2012-05-18 08:40:03 PDT
Comment on
attachment 142688
[details]
Patch The patch looks fine to me, but I am curious about the motivation. What does cancellation support really gain us in these cases? It looks like the only practical gain would be it would be possible to get a "cancelled" error after the async request is finished, since we are not checking for cancellation anywhere else that would avoid continued processing.
Carlos Garcia Campos
Comment 4
2012-05-18 08:53:08 PDT
(In reply to
comment #3
)
> (From update of
attachment 142688
[details]
) > The patch looks fine to me, but I am curious about the motivation.
Mainly consistency, cancellable is something expected in functions using the gio async model.
> What does cancellation support really gain us in these cases? It looks like the only practical gain would be it would be possible to get a "cancelled" error after the async request is finished, since we are not checking for cancellation anywhere else that would avoid continued processing.
Other methods follow the approach of async method + signals, for example, cancelling a download operation emits the error signal with cancelled error. And we have specific APIs for it webkit_download_cancel. Something similar happens when loadingf something in a web view (load error signal + stop_load method). For methods using the gio async model, we provide the standard way, a cancellable object that allow the user to cancel the operation (and from any thread). When the user finishes the operation CANCELLED error is returned.
Gustavo Noronha (kov)
Comment 5
2012-05-18 09:43:10 PDT
Comment on
attachment 142688
[details]
Patch OK, I guess we need cancellables anyway if we are to make the cancellation more useful in the future.
Carlos Garcia Campos
Comment 6
2012-05-20 23:38:41 PDT
Committed
r117735
: <
http://trac.webkit.org/changeset/117735
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug