aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-05-14 22:13:21 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-05-15 03:20:14 +0800
commitfe528d7847b14438dcdb44f6048891b57031d022 (patch)
tree5c48276ee484f567262be5db3ac91a74c2606844 /e-util
parent07830ef445b2cc0433f2a871c02b423e38f78f04 (diff)
downloadgsoc2013-evolution-fe528d7847b14438dcdb44f6048891b57031d022.tar.gz
gsoc2013-evolution-fe528d7847b14438dcdb44f6048891b57031d022.tar.zst
gsoc2013-evolution-fe528d7847b14438dcdb44f6048891b57031d022.zip
Minor e_web_view_install_request_handler() cleanup.
Make reference count handling a bit less awkward.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-web-view.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c
index 1c0d88c66d..3153740eaf 100644
--- a/e-util/e-web-view.c
+++ b/e-util/e-web-view.c
@@ -2846,22 +2846,19 @@ e_web_view_install_request_handler (EWebView *web_view,
{
SoupSession *session;
SoupSessionFeature *feature;
- gboolean new;
session = webkit_get_default_session ();
feature = soup_session_get_feature (session, SOUP_TYPE_REQUESTER);
- new = FALSE;
- if (feature == NULL) {
+ if (feature != NULL) {
+ g_object_ref (feature);
+ } else {
feature = SOUP_SESSION_FEATURE (soup_requester_new ());
soup_session_add_feature (session, feature);
- new = TRUE;
}
soup_session_feature_add_feature (feature, handler_type);
- if (new) {
- g_object_unref (feature);
- }
+ g_object_unref (feature);
}