[evolution] Minor e_web_view_install_request_handler() cleanup.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Minor e_web_view_install_request_handler() cleanup.
- Date: Tue, 14 May 2013 19:34:57 +0000 (UTC)
commit fe528d7847b14438dcdb44f6048891b57031d022
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue May 14 10:13:21 2013 -0400
Minor e_web_view_install_request_handler() cleanup.
Make reference count handling a bit less awkward.
e-util/e-web-view.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c
index 1c0d88c..3153740 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]