[epiphany] Purge g_return from embed/



commit beaba05ad10f424727ce3ba192eb96319ba0750d
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Fri Aug 11 04:03:13 2017 -0500

    Purge g_return from embed/

 embed/ephy-download.c                         |   24 ++++----
 embed/ephy-downloads-manager.c                |   14 +++---
 embed/ephy-embed-container.c                  |   18 +++---
 embed/ephy-embed-event.c                      |   18 +++---
 embed/ephy-embed-shell.c                      |   20 ++++----
 embed/ephy-embed-utils.c                      |    2 +-
 embed/ephy-embed.c                            |   34 ++++++------
 embed/ephy-encoding.c                         |   15 +++---
 embed/ephy-encodings.c                        |   12 ++--
 embed/ephy-file-monitor.c                     |    6 +-
 embed/ephy-find-toolbar.c                     |    4 +-
 embed/ephy-option-menu.c                      |   10 ++--
 embed/ephy-web-extension-proxy.c              |   16 +++---
 embed/ephy-web-view.c                         |   68 ++++++++++++------------
 embed/web-extension/ephy-embed-form-auth.c    |    2 +-
 embed/web-extension/ephy-uri-tester.c         |    2 +-
 embed/web-extension/ephy-web-extension.c      |    2 +-
 embed/web-extension/ephy-web-overview-model.c |   16 +++---
 embed/web-extension/ephy-web-overview.c       |    4 +-
 19 files changed, 144 insertions(+), 143 deletions(-)
---
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index fae5ab9..9d83dae 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -270,8 +270,8 @@ void
 ephy_download_set_destination_uri (EphyDownload *download,
                                    const char   *destination)
 {
-  g_return_if_fail (EPHY_IS_DOWNLOAD (download));
-  g_return_if_fail (destination != NULL);
+  g_assert (EPHY_IS_DOWNLOAD (download));
+  g_assert (destination != NULL);
 
   webkit_download_set_destination (download->download, destination);
   g_object_notify_by_pspec (G_OBJECT (download), obj_properties[PROP_DESTINATION]);
@@ -290,7 +290,7 @@ void
 ephy_download_set_action (EphyDownload          *download,
                           EphyDownloadActionType action)
 {
-  g_return_if_fail (EPHY_IS_DOWNLOAD (download));
+  g_assert (EPHY_IS_DOWNLOAD (download));
 
   download->action = action;
   g_object_notify_by_pspec (G_OBJECT (download), obj_properties[PROP_ACTION]);
@@ -307,7 +307,7 @@ ephy_download_set_action (EphyDownload          *download,
 WebKitDownload *
 ephy_download_get_webkit_download (EphyDownload *download)
 {
-  g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), NULL);
+  g_assert (EPHY_IS_DOWNLOAD (download));
 
   return download->download;
 }
@@ -323,7 +323,7 @@ ephy_download_get_webkit_download (EphyDownload *download)
 const char *
 ephy_download_get_destination_uri (EphyDownload *download)
 {
-  g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), NULL);
+  g_assert (EPHY_IS_DOWNLOAD (download));
 
   return webkit_download_get_destination (download->download);
 }
@@ -342,7 +342,7 @@ ephy_download_get_destination_uri (EphyDownload *download)
 EphyDownloadActionType
 ephy_download_get_action (EphyDownload *download)
 {
-  g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), EPHY_DOWNLOAD_ACTION_NONE);
+  g_assert (EPHY_IS_DOWNLOAD (download));
 
   return download->action;
 }
@@ -373,7 +373,7 @@ ephy_download_get_start_time (EphyDownload *download)
 void
 ephy_download_cancel (EphyDownload *download)
 {
-  g_return_if_fail (EPHY_IS_DOWNLOAD (download));
+  g_assert (EPHY_IS_DOWNLOAD (download));
 
   webkit_download_cancel (download->download);
 }
@@ -381,7 +381,7 @@ ephy_download_cancel (EphyDownload *download)
 gboolean
 ephy_download_is_active (EphyDownload *download)
 {
-  g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), FALSE);
+  g_assert (EPHY_IS_DOWNLOAD (download));
 
   return !download->finished;
 }
@@ -389,7 +389,7 @@ ephy_download_is_active (EphyDownload *download)
 gboolean
 ephy_download_succeeded (EphyDownload *download)
 {
-  g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), FALSE);
+  g_assert (EPHY_IS_DOWNLOAD (download));
 
   return download->finished && !download->error;
 }
@@ -398,7 +398,7 @@ gboolean
 ephy_download_failed (EphyDownload *download,
                       GError      **error)
 {
-  g_return_val_if_fail (EPHY_IS_DOWNLOAD (download), FALSE);
+  g_assert (EPHY_IS_DOWNLOAD (download));
 
   if (download->finished && download->error) {
     if (error)
@@ -722,7 +722,7 @@ ephy_download_new (WebKitDownload *download)
 {
   EphyDownload *ephy_download;
 
-  g_return_val_if_fail (WEBKIT_IS_DOWNLOAD (download), NULL);
+  g_assert (WEBKIT_IS_DOWNLOAD (download));
 
   ephy_download = g_object_new (EPHY_TYPE_DOWNLOAD, NULL);
 
@@ -763,7 +763,7 @@ ephy_download_new_for_uri (const char *uri)
   WebKitDownload *download;
   EphyEmbedShell *shell = ephy_embed_shell_get_default ();
 
-  g_return_val_if_fail (uri != NULL, NULL);
+  g_assert (uri != NULL);
 
   download = webkit_web_context_download_uri (ephy_embed_shell_get_web_context (shell), uri);
   ephy_download = ephy_download_new (download);
diff --git a/embed/ephy-downloads-manager.c b/embed/ephy-downloads-manager.c
index 3209a9a..c40af02 100644
--- a/embed/ephy-downloads-manager.c
+++ b/embed/ephy-downloads-manager.c
@@ -165,8 +165,8 @@ ephy_downloads_manager_add_download (EphyDownloadsManager *manager,
 {
   WebKitDownload *wk_download;
 
-  g_return_if_fail (EPHY_IS_DOWNLOADS_MANAGER (manager));
-  g_return_if_fail (EPHY_IS_DOWNLOAD (download));
+  g_assert (EPHY_IS_DOWNLOADS_MANAGER (manager));
+  g_assert (EPHY_IS_DOWNLOAD (download));
 
   if (g_list_find (manager->downloads, download))
     return;
@@ -195,8 +195,8 @@ ephy_downloads_manager_remove_download (EphyDownloadsManager *manager,
 {
   GList *download_link;
 
-  g_return_if_fail (EPHY_IS_DOWNLOADS_MANAGER (manager));
-  g_return_if_fail (EPHY_IS_DOWNLOAD (download));
+  g_assert (EPHY_IS_DOWNLOADS_MANAGER (manager));
+  g_assert (EPHY_IS_DOWNLOAD (download));
 
   download_link = g_list_find (manager->downloads, download);
   if (!download_link)
@@ -212,7 +212,7 @@ ephy_downloads_manager_has_active_downloads (EphyDownloadsManager *manager)
 {
   GList *l;
 
-  g_return_val_if_fail (EPHY_IS_DOWNLOADS_MANAGER (manager), FALSE);
+  g_assert (EPHY_IS_DOWNLOADS_MANAGER (manager));
 
   for (l = manager->downloads; l; l = g_list_next (l)) {
     EphyDownload *download = EPHY_DOWNLOAD (l->data);
@@ -227,7 +227,7 @@ ephy_downloads_manager_has_active_downloads (EphyDownloadsManager *manager)
 GList *
 ephy_downloads_manager_get_downloads (EphyDownloadsManager *manager)
 {
-  g_return_val_if_fail (EPHY_IS_DOWNLOADS_MANAGER (manager), NULL);
+  g_assert (EPHY_IS_DOWNLOADS_MANAGER (manager));
 
   return manager->downloads;
 }
@@ -239,7 +239,7 @@ ephy_downloads_manager_get_estimated_progress (EphyDownloadsManager *manager)
   guint n_active = 0;
   gdouble progress = 0;
 
-  g_return_val_if_fail (EPHY_IS_DOWNLOADS_MANAGER (manager), 0);
+  g_assert (EPHY_IS_DOWNLOADS_MANAGER (manager));
 
   for (l = manager->downloads; l; l = g_list_next (l)) {
     EphyDownload *download = EPHY_DOWNLOAD (l->data);
diff --git a/embed/ephy-embed-container.c b/embed/ephy-embed-container.c
index 78a90da..addf0aa 100644
--- a/embed/ephy-embed-container.c
+++ b/embed/ephy-embed-container.c
@@ -59,8 +59,8 @@ ephy_embed_container_add_child (EphyEmbedContainer *container,
 {
   EphyEmbedContainerInterface *iface;
 
-  g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), -1);
-  g_return_val_if_fail (EPHY_IS_EMBED (child), -1);
+  g_assert (EPHY_IS_EMBED_CONTAINER (container));
+  g_assert (EPHY_IS_EMBED (child));
 
   iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
   return iface->add_child (container, child, position, set_active);
@@ -79,8 +79,8 @@ ephy_embed_container_set_active_child (EphyEmbedContainer *container,
 {
   EphyEmbedContainerInterface *iface;
 
-  g_return_if_fail (EPHY_IS_EMBED_CONTAINER (container));
-  g_return_if_fail (EPHY_IS_EMBED (child));
+  g_assert (EPHY_IS_EMBED_CONTAINER (container));
+  g_assert (EPHY_IS_EMBED (child));
 
   iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
 
@@ -100,8 +100,8 @@ ephy_embed_container_remove_child (EphyEmbedContainer *container,
 {
   EphyEmbedContainerInterface *iface;
 
-  g_return_if_fail (EPHY_IS_EMBED_CONTAINER (container));
-  g_return_if_fail (EPHY_IS_EMBED (child));
+  g_assert (EPHY_IS_EMBED_CONTAINER (container));
+  g_assert (EPHY_IS_EMBED (child));
 
   iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
 
@@ -121,7 +121,7 @@ ephy_embed_container_get_active_child (EphyEmbedContainer *container)
 {
   EphyEmbedContainerInterface *iface;
 
-  g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), NULL);
+  g_assert (EPHY_IS_EMBED_CONTAINER (container));
 
   iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
   return iface->get_active_child (container);
@@ -141,7 +141,7 @@ ephy_embed_container_get_children (EphyEmbedContainer *container)
 {
   EphyEmbedContainerInterface *iface;
 
-  g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), NULL);
+  g_assert (EPHY_IS_EMBED_CONTAINER (container));
 
   iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
   return iface->get_children (container);
@@ -160,7 +160,7 @@ ephy_embed_container_get_is_popup (EphyEmbedContainer *container)
 {
   EphyEmbedContainerInterface *iface;
 
-  g_return_val_if_fail (EPHY_IS_EMBED_CONTAINER (container), FALSE);
+  g_assert (EPHY_IS_EMBED_CONTAINER (container));
 
   iface = EPHY_EMBED_CONTAINER_GET_IFACE (container);
   return iface->get_is_popup (container);
diff --git a/embed/ephy-embed-event.c b/embed/ephy-embed-event.c
index b309d3b..ec202ec 100644
--- a/embed/ephy-embed-event.c
+++ b/embed/ephy-embed-event.c
@@ -78,7 +78,7 @@ ephy_embed_event_get_context (EphyEmbedEvent *event)
 {
   guint context;
 
-  g_return_val_if_fail (EPHY_IS_EMBED_EVENT (event), 0);
+  g_assert (EPHY_IS_EMBED_EVENT (event));
 
   g_object_get (event->hit_test_result, "context", &context, NULL);
   return context;
@@ -87,7 +87,7 @@ ephy_embed_event_get_context (EphyEmbedEvent *event)
 guint
 ephy_embed_event_get_button (EphyEmbedEvent *event)
 {
-  g_return_val_if_fail (EPHY_IS_EMBED_EVENT (event), 0);
+  g_assert (EPHY_IS_EMBED_EVENT (event));
 
   return event->button;
 }
@@ -95,7 +95,7 @@ ephy_embed_event_get_button (EphyEmbedEvent *event)
 guint
 ephy_embed_event_get_modifier (EphyEmbedEvent *event)
 {
-  g_return_val_if_fail (EPHY_IS_EMBED_EVENT (event), 0);
+  g_assert (EPHY_IS_EMBED_EVENT (event));
 
   return event->modifier;
 }
@@ -104,7 +104,7 @@ void
 ephy_embed_event_get_coords (EphyEmbedEvent *event,
                              guint *x, guint *y)
 {
-  g_return_if_fail (EPHY_IS_EMBED_EVENT (event));
+  g_assert (EPHY_IS_EMBED_EVENT (event));
 
   if (x)
     *x = event->x;
@@ -123,8 +123,8 @@ ephy_embed_event_get_property (EphyEmbedEvent *event,
                                const char     *name,
                                GValue         *value)
 {
-  g_return_if_fail (EPHY_IS_EMBED_EVENT (event));
-  g_return_if_fail (name);
+  g_assert (EPHY_IS_EMBED_EVENT (event));
+  g_assert (name);
 
   /* FIXME: ugly hack! This only works for now because all properties
      we have are strings */
@@ -137,8 +137,8 @@ gboolean
 ephy_embed_event_has_property (EphyEmbedEvent *event,
                                const char     *name)
 {
-  g_return_val_if_fail (EPHY_IS_EMBED_EVENT (event), FALSE);
-  g_return_val_if_fail (name, FALSE);
+  g_assert (EPHY_IS_EMBED_EVENT (event));
+  g_assert (name);
 
   return g_object_class_find_property (G_OBJECT_GET_CLASS (event->hit_test_result),
                                        name) != NULL;
@@ -153,7 +153,7 @@ ephy_embed_event_has_property (EphyEmbedEvent *event,
 WebKitHitTestResult *
 ephy_embed_event_get_hit_test_result (EphyEmbedEvent *event)
 {
-  g_return_val_if_fail (EPHY_IS_EMBED_EVENT (event), NULL);
+  g_assert (EPHY_IS_EMBED_EVENT (event));
 
   return event->hit_test_result;
 }
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 3ca8c45..29f8f1b 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -539,7 +539,7 @@ ephy_embed_shell_get_global_history_service (EphyEmbedShell *shell)
 {
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
 
-  g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+  g_assert (EPHY_IS_EMBED_SHELL (shell));
 
   if (priv->global_history_service == NULL) {
     char *filename;
@@ -554,7 +554,7 @@ ephy_embed_shell_get_global_history_service (EphyEmbedShell *shell)
     filename = g_build_filename (ephy_dot_dir (), EPHY_HISTORY_FILE, NULL);
     priv->global_history_service = ephy_history_service_new (filename, mode);
     g_free (filename);
-    g_return_val_if_fail (priv->global_history_service, NULL);
+    g_assert (priv->global_history_service);
     g_signal_connect (priv->global_history_service, "urls-visited",
                       G_CALLBACK (history_service_urls_visited_cb),
                       shell);
@@ -597,7 +597,7 @@ ephy_embed_shell_get_encodings (EphyEmbedShell *shell)
 {
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
 
-  g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+  g_assert (EPHY_IS_EMBED_SHELL (shell));
 
   if (priv->encodings == NULL)
     priv->encodings = ephy_encodings_new ();
@@ -1291,7 +1291,7 @@ ephy_embed_shell_set_page_setup (EphyEmbedShell *shell,
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
   char *path;
 
-  g_return_if_fail (EPHY_IS_EMBED_SHELL (shell));
+  g_assert (EPHY_IS_EMBED_SHELL (shell));
 
   if (page_setup != NULL)
     g_object_ref (page_setup);
@@ -1318,7 +1318,7 @@ ephy_embed_shell_get_page_setup (EphyEmbedShell *shell)
 {
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
 
-  g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+  g_assert (EPHY_IS_EMBED_SHELL (shell));
 
   if (priv->page_setup == NULL) {
     GError *error = NULL;
@@ -1354,7 +1354,7 @@ ephy_embed_shell_set_print_settings (EphyEmbedShell   *shell,
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
   char *path;
 
-  g_return_if_fail (EPHY_IS_EMBED_SHELL (shell));
+  g_assert (EPHY_IS_EMBED_SHELL (shell));
 
   if (settings != NULL)
     g_object_ref (settings);
@@ -1382,7 +1382,7 @@ ephy_embed_shell_get_print_settings (EphyEmbedShell *shell)
 {
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
 
-  g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL);
+  g_assert (EPHY_IS_EMBED_SHELL (shell));
 
   if (priv->print_settings == NULL) {
     GError *error = NULL;
@@ -1414,7 +1414,7 @@ ephy_embed_shell_get_mode (EphyEmbedShell *shell)
 {
   EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
 
-  g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), EPHY_EMBED_SHELL_MODE_BROWSER);
+  g_assert (EPHY_IS_EMBED_SHELL (shell));
 
   return priv->mode;
 }
@@ -1442,8 +1442,8 @@ ephy_embed_shell_launch_handler (EphyEmbedShell *shell,
   GList *list = NULL;
   gboolean ret = FALSE;
 
-  g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), FALSE);
-  g_return_val_if_fail (file || mime_type, FALSE);
+  g_assert (EPHY_IS_EMBED_SHELL (shell));
+  g_assert (file || mime_type);
 
   app = ephy_file_launcher_get_app_info_for_file (file, mime_type);
 
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c
index 3836792..5e8b26c 100644
--- a/embed/ephy-embed-utils.c
+++ b/embed/ephy-embed-utils.c
@@ -222,7 +222,7 @@ ephy_embed_utils_normalize_address (const char *address)
 {
   char *effective_address = NULL;
 
-  g_return_val_if_fail (address, NULL);
+  g_assert (address);
 
   if (is_bang_search (address)) {
     EphyEmbedShell *shell;
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 355da72..88ce8f7 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -135,8 +135,8 @@ ephy_embed_statusbar_get_context_id (EphyEmbed *embed, const char  *context_desc
   char *string;
   guint id;
 
-  g_return_val_if_fail (EPHY_IS_EMBED (embed), 0);
-  g_return_val_if_fail (context_description != NULL, 0);
+  g_assert (EPHY_IS_EMBED (embed));
+  g_assert (context_description != NULL);
 
   /* we need to preserve namespaces on object datas */
   string = g_strconcat ("ephy-embed-status-bar-context:", context_description, NULL);
@@ -167,7 +167,7 @@ ephy_embed_set_statusbar_label (EphyEmbed *embed, const char *label)
 static void
 ephy_embed_statusbar_update (EphyEmbed *embed, const char *text)
 {
-  g_return_if_fail (EPHY_IS_EMBED (embed));
+  g_assert (EPHY_IS_EMBED (embed));
 
   ephy_embed_set_statusbar_label (embed, text);
 }
@@ -177,9 +177,9 @@ ephy_embed_statusbar_push (EphyEmbed *embed, guint context_id, const char *text)
 {
   EphyEmbedStatusbarMsg *msg;
 
-  g_return_val_if_fail (EPHY_IS_EMBED (embed), 0);
-  g_return_val_if_fail (context_id != 0, 0);
-  g_return_val_if_fail (text != NULL, 0);
+  g_assert (EPHY_IS_EMBED (embed));
+  g_assert (context_id != 0);
+  g_assert (text != NULL);
 
   msg = g_slice_new (EphyEmbedStatusbarMsg);
   msg->text = g_strdup (text);
@@ -201,8 +201,8 @@ ephy_embed_statusbar_pop (EphyEmbed *embed, guint context_id)
   EphyEmbedStatusbarMsg *msg;
   GSList *list;
 
-  g_return_if_fail (EPHY_IS_EMBED (embed));
-  g_return_if_fail (context_id != 0);
+  g_assert (EPHY_IS_EMBED (embed));
+  g_assert (context_id != 0);
 
   for (list = embed->messages; list; list = list->next) {
     msg = list->data;
@@ -815,7 +815,7 @@ ephy_embed_init (EphyEmbed *embed)
 EphyWebView *
 ephy_embed_get_web_view (EphyEmbed *embed)
 {
-  g_return_val_if_fail (EPHY_IS_EMBED (embed), NULL);
+  g_assert (EPHY_IS_EMBED (embed));
 
   return EPHY_WEB_VIEW (embed->web_view);
 }
@@ -831,7 +831,7 @@ ephy_embed_get_web_view (EphyEmbed *embed)
 EphyFindToolbar *
 ephy_embed_get_find_toolbar (EphyEmbed *embed)
 {
-  g_return_val_if_fail (EPHY_IS_EMBED (embed), NULL);
+  g_assert (EPHY_IS_EMBED (embed));
 
   return EPHY_FIND_TOOLBAR (embed->find_toolbar);
 }
@@ -903,8 +903,8 @@ ephy_embed_remove_top_widget (EphyEmbed *embed, GtkWidget *widget)
 void
 ephy_embed_set_delayed_load_request (EphyEmbed *embed, WebKitURIRequest *request, WebKitWebViewSessionState 
*state)
 {
-  g_return_if_fail (EPHY_IS_EMBED (embed));
-  g_return_if_fail (WEBKIT_IS_URI_REQUEST (request));
+  g_assert (EPHY_IS_EMBED (embed));
+  g_assert (WEBKIT_IS_URI_REQUEST (request));
 
   g_clear_pointer (&embed->delayed_state, webkit_web_view_session_state_unref);
   g_clear_object (&embed->delayed_request);
@@ -925,7 +925,7 @@ ephy_embed_set_delayed_load_request (EphyEmbed *embed, WebKitURIRequest *request
 gboolean
 ephy_embed_has_load_pending (EphyEmbed *embed)
 {
-  g_return_val_if_fail (EPHY_IS_EMBED (embed), FALSE);
+  g_assert (EPHY_IS_EMBED (embed));
 
   return !!embed->delayed_request;
 }
@@ -933,7 +933,7 @@ ephy_embed_has_load_pending (EphyEmbed *embed)
 const char *
 ephy_embed_get_title (EphyEmbed *embed)
 {
-  g_return_val_if_fail (EPHY_IS_EMBED (embed), NULL);
+  g_assert (EPHY_IS_EMBED (embed));
 
   return embed->title;
 }
@@ -950,7 +950,7 @@ ephy_embed_get_title (EphyEmbed *embed)
 gboolean
 ephy_embed_inspector_is_loaded (EphyEmbed *embed)
 {
-  g_return_val_if_fail (EPHY_IS_EMBED (embed), FALSE);
+  g_assert (EPHY_IS_EMBED (embed));
 
   return embed->inspector_loaded;
 }
@@ -960,7 +960,7 @@ ephy_embed_attach_notification_container (EphyEmbed *embed)
 {
   EphyNotificationContainer *container;
 
-  g_return_if_fail (EPHY_IS_EMBED (embed));
+  g_assert (EPHY_IS_EMBED (embed));
 
   container = ephy_notification_container_get_default ();
   if (gtk_widget_get_parent (GTK_WIDGET (container)) == NULL)
@@ -972,7 +972,7 @@ ephy_embed_detach_notification_container (EphyEmbed *embed)
 {
   EphyNotificationContainer *container;
 
-  g_return_if_fail (EPHY_IS_EMBED (embed));
+  g_assert (EPHY_IS_EMBED (embed));
 
   container = ephy_notification_container_get_default ();
   if (gtk_widget_get_parent (GTK_WIDGET (container)) == embed->overlay) {
diff --git a/embed/ephy-encoding.c b/embed/ephy-encoding.c
index 455f704..fdc7d78 100644
--- a/embed/ephy-encoding.c
+++ b/embed/ephy-encoding.c
@@ -224,7 +224,7 @@ ephy_encoding_init (EphyEncoding *encoding)
 const char *
 ephy_encoding_get_title (EphyEncoding *encoding)
 {
-  g_return_val_if_fail (EPHY_IS_ENCODING (encoding), NULL);
+  g_assert (EPHY_IS_ENCODING (encoding));
 
   return encoding->title;
 }
@@ -232,7 +232,7 @@ ephy_encoding_get_title (EphyEncoding *encoding)
 const char *
 ephy_encoding_get_title_elided (EphyEncoding *encoding)
 {
-  g_return_val_if_fail (EPHY_IS_ENCODING (encoding), NULL);
+  g_assert (EPHY_IS_ENCODING (encoding));
 
   return encoding->title_elided;
 }
@@ -240,7 +240,7 @@ ephy_encoding_get_title_elided (EphyEncoding *encoding)
 const char *
 ephy_encoding_get_collation_key (EphyEncoding *encoding)
 {
-  g_return_val_if_fail (EPHY_IS_ENCODING (encoding), NULL);
+  g_assert (EPHY_IS_ENCODING (encoding));
 
   return encoding->collation_key;
 }
@@ -248,7 +248,7 @@ ephy_encoding_get_collation_key (EphyEncoding *encoding)
 const char *
 ephy_encoding_get_encoding (EphyEncoding *encoding)
 {
-  g_return_val_if_fail (EPHY_IS_ENCODING (encoding), NULL);
+  g_assert (EPHY_IS_ENCODING (encoding));
 
   return encoding->encoding;
 }
@@ -256,14 +256,15 @@ ephy_encoding_get_encoding (EphyEncoding *encoding)
 int
 ephy_encoding_get_language_groups (EphyEncoding *encoding)
 {
-  g_return_val_if_fail (EPHY_IS_ENCODING (encoding), LG_NONE);
+  g_assert (EPHY_IS_ENCODING (encoding));
 
   return encoding->language_groups;
 }
 
 EphyEncoding *
-ephy_encoding_new (const char *encoding, const char *title,
-                   int language_groups)
+ephy_encoding_new (const char *encoding,
+                   const char *title,
+                   int         language_groups)
 {
   return g_object_new (EPHY_TYPE_ENCODING,
                        "encoding", encoding,
diff --git a/embed/ephy-encodings.c b/embed/ephy-encodings.c
index 79dbda1..b44dd7d 100644
--- a/embed/ephy-encodings.c
+++ b/embed/ephy-encodings.c
@@ -206,7 +206,7 @@ ephy_encodings_get_encoding (EphyEncodings *encodings,
 {
   EphyEncoding *encoding;
 
-  g_return_val_if_fail (EPHY_IS_ENCODINGS (encodings), NULL);
+  g_assert (EPHY_IS_ENCODINGS (encodings));
 
   encoding = g_hash_table_lookup (encodings->hash, code);
 
@@ -273,7 +273,7 @@ ephy_encodings_get_all (EphyEncodings *encodings)
 {
   GList *l = NULL;
 
-  g_return_val_if_fail (EPHY_IS_ENCODINGS (encodings), NULL);
+  g_assert (EPHY_IS_ENCODINGS (encodings));
 
   g_hash_table_foreach (encodings->hash, (GHFunc)get_all_encodings, &l);
 
@@ -287,8 +287,8 @@ ephy_encodings_add_recent (EphyEncodings *encodings,
   GSList *element, *l;
   GVariantBuilder builder;
 
-  g_return_if_fail (EPHY_IS_ENCODINGS (encodings));
-  g_return_if_fail (code != NULL);
+  g_assert (EPHY_IS_ENCODINGS (encodings));
+  g_assert (code != NULL);
 
   if (ephy_encodings_get_encoding (encodings, code, FALSE) == NULL)
     return;
@@ -331,13 +331,13 @@ ephy_encodings_get_recent (EphyEncodings *encodings)
   GSList *l;
   GList *list = NULL;
 
-  g_return_val_if_fail (EPHY_IS_ENCODINGS (encodings), NULL);
+  g_assert (EPHY_IS_ENCODINGS (encodings));
 
   for (l = encodings->recent; l != NULL; l = l->next) {
     EphyEncoding *encoding;
 
     encoding = ephy_encodings_get_encoding (encodings, (char *)l->data, FALSE);
-    g_return_val_if_fail (EPHY_IS_ENCODING (encoding), NULL);
+    g_assert (EPHY_IS_ENCODING (encoding));
 
     list = g_list_prepend (list, encoding);
   }
diff --git a/embed/ephy-file-monitor.c b/embed/ephy-file-monitor.c
index 73dd960..0c7f3f1 100644
--- a/embed/ephy-file-monitor.c
+++ b/embed/ephy-file-monitor.c
@@ -52,7 +52,7 @@ static GParamSpec *obj_properties[LAST_PROP];
 static void
 ephy_file_monitor_cancel (EphyFileMonitor *monitor)
 {
-  g_return_if_fail (EPHY_IS_FILE_MONITOR (monitor));
+  g_assert (EPHY_IS_FILE_MONITOR (monitor));
 
   if (monitor->monitor != NULL) {
     LOG ("Cancelling file monitor");
@@ -171,8 +171,8 @@ ephy_file_monitor_update_location (EphyFileMonitor *file_monitor,
   GFileType file_type;
   GFileInfo *file_info;
 
-  g_return_if_fail (EPHY_IS_FILE_MONITOR (file_monitor));
-  g_return_if_fail (address != NULL);
+  g_assert (EPHY_IS_FILE_MONITOR (file_monitor));
+  g_assert (address != NULL);
 
   ephy_file_monitor_cancel (file_monitor);
 
diff --git a/embed/ephy-find-toolbar.c b/embed/ephy-find-toolbar.c
index 0ec4cfb..a9a03d3 100644
--- a/embed/ephy-find-toolbar.c
+++ b/embed/ephy-find-toolbar.c
@@ -144,7 +144,7 @@ tab_search_key_press_cb (WebKitWebView   *web_view,
 {
   GtkWidget *widget = (GtkWidget *)toolbar;
 
-  g_return_val_if_fail (event != NULL, FALSE);
+  g_assert (event != NULL);
 
   /* check for / and ' which open the find toolbar in text resp. link mode */
   if (gtk_search_bar_get_search_mode (GTK_SEARCH_BAR (widget)) == FALSE) {
@@ -586,7 +586,7 @@ ephy_find_toolbar_open (EphyFindToolbar *toolbar,
                         gboolean         links_only,
                         gboolean         typing_ahead)
 {
-  g_return_if_fail (toolbar->web_view != NULL);
+  g_assert (toolbar->web_view != NULL);
 
   toolbar->typing_ahead = typing_ahead;
   toolbar->links_only = links_only;
diff --git a/embed/ephy-option-menu.c b/embed/ephy-option-menu.c
index e4ec7f6..75441a2 100644
--- a/embed/ephy-option-menu.c
+++ b/embed/ephy-option-menu.c
@@ -499,8 +499,8 @@ GtkWidget *
 ephy_option_menu_new (EphyWebView      *view,
                       WebKitOptionMenu *menu)
 {
-  g_return_val_if_fail (EPHY_IS_WEB_VIEW (view), NULL);
-  g_return_val_if_fail (WEBKIT_IS_OPTION_MENU (menu), NULL);
+  g_assert (EPHY_IS_WEB_VIEW (view));
+  g_assert (WEBKIT_IS_OPTION_MENU (menu));
 
   return g_object_new (EPHY_TYPE_OPTION_MENU,
                        "view", view,
@@ -547,8 +547,8 @@ ephy_option_menu_popup (EphyOptionMenu *menu,
   GtkWidget *toplevel;
   GtkScrolledWindow *swindow;
 
-  g_return_if_fail (EPHY_IS_OPTION_MENU (menu));
-  g_return_if_fail (rect != NULL);
+  g_assert (EPHY_IS_OPTION_MENU (menu));
+  g_assert (rect != NULL);
 
   window = gtk_widget_get_window (GTK_WIDGET (menu->view));
   gdk_window_get_origin (window, &x, &y);
@@ -629,7 +629,7 @@ ephy_option_menu_popup (EphyOptionMenu *menu,
 void
 ephy_option_menu_popdown (EphyOptionMenu *menu)
 {
-  g_return_if_fail (EPHY_IS_OPTION_MENU (menu));
+  g_assert (EPHY_IS_OPTION_MENU (menu));
 
   if (!menu->device)
     return;
diff --git a/embed/ephy-web-extension-proxy.c b/embed/ephy-web-extension-proxy.c
index 519db85..be0cf97 100644
--- a/embed/ephy-web-extension-proxy.c
+++ b/embed/ephy-web-extension-proxy.c
@@ -165,7 +165,7 @@ ephy_web_extension_proxy_new (GDBusConnection *connection)
 {
   EphyWebExtensionProxy *web_extension;
 
-  g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL);
+  g_assert (G_IS_DBUS_CONNECTION (connection));
 
   web_extension = g_object_new (EPHY_TYPE_WEB_EXTENSION_PROXY, NULL);
 
@@ -193,7 +193,7 @@ ephy_web_extension_proxy_form_auth_data_save_confirmation_response (EphyWebExten
                                                                     guint                  request_id,
                                                                     gboolean               response)
 {
-  g_return_if_fail (EPHY_IS_WEB_EXTENSION_PROXY (web_extension));
+  g_assert (EPHY_IS_WEB_EXTENSION_PROXY (web_extension));
 
   if (!web_extension->proxy)
     return;
@@ -234,7 +234,7 @@ ephy_web_extension_proxy_web_page_has_modified_forms (EphyWebExtensionProxy *web
 {
   GTask *task;
 
-  g_return_if_fail (EPHY_IS_WEB_EXTENSION_PROXY (web_extension));
+  g_assert (EPHY_IS_WEB_EXTENSION_PROXY (web_extension));
 
   task = g_task_new (web_extension, cancellable, callback, user_data);
 
@@ -259,7 +259,7 @@ ephy_web_extension_proxy_web_page_has_modified_forms_finish (EphyWebExtensionPro
                                                              GAsyncResult          *result,
                                                              GError               **error)
 {
-  g_return_val_if_fail (g_task_is_valid (result, web_extension), FALSE);
+  g_assert (g_task_is_valid (result, web_extension));
 
   return g_task_propagate_boolean (G_TASK (result), error);
 }
@@ -291,7 +291,7 @@ ephy_web_extension_proxy_get_best_web_app_icon (EphyWebExtensionProxy *web_exten
 {
   GTask *task;
 
-  g_return_if_fail (EPHY_IS_WEB_EXTENSION_PROXY (web_extension));
+  g_assert (EPHY_IS_WEB_EXTENSION_PROXY (web_extension));
 
   task = g_task_new (web_extension, cancellable, callback, user_data);
 
@@ -321,7 +321,7 @@ ephy_web_extension_proxy_get_best_web_app_icon_finish (EphyWebExtensionProxy *we
   GVariant *variant;
   GTask *task = G_TASK (result);
 
-  g_return_val_if_fail (g_task_is_valid (result, web_extension), FALSE);
+  g_assert (g_task_is_valid (result, web_extension));
 
   variant = g_task_propagate_pointer (task, error);
   if (!variant)
@@ -363,7 +363,7 @@ ephy_web_extension_proxy_get_web_app_title (EphyWebExtensionProxy *web_extension
 {
   GTask *task;
 
-  g_return_if_fail (EPHY_IS_WEB_EXTENSION_PROXY (web_extension));
+  g_assert (EPHY_IS_WEB_EXTENSION_PROXY (web_extension));
 
   task = g_task_new (web_extension, cancellable, callback, user_data);
 
@@ -388,7 +388,7 @@ ephy_web_extension_proxy_get_web_app_title_finish (EphyWebExtensionProxy *web_ex
                                                    GAsyncResult          *result,
                                                    GError               **error)
 {
-  g_return_val_if_fail (g_task_is_valid (result, web_extension), FALSE);
+  g_assert (g_task_is_valid (result, web_extension));
 
   return g_task_propagate_pointer (G_TASK (result), error);
 }
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 4301591..6303942 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -203,10 +203,10 @@ popups_manager_new_window_info (EphyEmbedContainer *container)
   char *features;
 
   g_object_get (container, "is-popup", &is_popup, NULL);
-  g_return_val_if_fail (is_popup, g_strdup (""));
+  g_assert (is_popup);
 
   embed = ephy_embed_container_get_active_child (container);
-  g_return_val_if_fail (embed != NULL, g_strdup (""));
+  g_assert (embed != NULL);
 
   gtk_widget_get_allocation (GTK_WIDGET (embed), &allocation);
 
@@ -264,7 +264,7 @@ popups_manager_hide (EphyEmbedContainer *container,
   char *features;
 
   embed = ephy_embed_container_get_active_child (container);
-  g_return_if_fail (EPHY_IS_EMBED (embed));
+  g_assert (EPHY_IS_EMBED (embed));
 
   location = ephy_web_view_get_address (ephy_embed_get_web_view (embed));
   if (location == NULL) return;
@@ -815,8 +815,8 @@ allow_tls_certificate_cb (EphyEmbedShell *shell,
   if (webkit_web_view_get_page_id (WEBKIT_WEB_VIEW (view)) != page_id)
     return;
 
-  g_return_if_fail (G_IS_TLS_CERTIFICATE (view->certificate));
-  g_return_if_fail (view->tls_error_failing_uri != NULL);
+  g_assert (G_IS_TLS_CERTIFICATE (view->certificate));
+  g_assert (view->tls_error_failing_uri != NULL);
 
   uri = soup_uri_new (view->tls_error_failing_uri);
   webkit_web_context_allow_tls_certificate_for_host (ephy_embed_shell_get_web_context (shell),
@@ -1251,10 +1251,10 @@ new_window_cb (EphyWebView *view,
 {
   EphyEmbedContainer *container;
 
-  g_return_if_fail (new_view != NULL);
+  g_assert (new_view != NULL);
 
   container = EPHY_EMBED_CONTAINER (gtk_widget_get_toplevel (GTK_WIDGET (new_view)));
-  g_return_if_fail (container != NULL || !gtk_widget_is_toplevel (GTK_WIDGET (container)));
+  g_assert (container != NULL || !gtk_widget_is_toplevel (GTK_WIDGET (container)));
 
   popups_manager_add_window (view, container);
 }
@@ -1834,7 +1834,7 @@ ephy_web_view_set_placeholder (EphyWebView *view,
 {
   char *html;
 
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   /* We want only the actual load to be the one recorded in history, but
    * doing a load here is the simplest way to replace the loading
@@ -1937,7 +1937,7 @@ detailed_message_from_tls_errors (GTlsCertificateFlags tls_errors)
 EphyWebViewErrorPage
 ephy_web_view_get_error_page (EphyWebView *view)
 {
-  g_return_val_if_fail (EPHY_IS_WEB_VIEW (view), EPHY_WEB_VIEW_ERROR_PAGE_NONE);
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   return view->error_page;
 }
@@ -2178,7 +2178,7 @@ ephy_web_view_load_error_page (EphyWebView         *view,
   const char *icon_name = NULL;
   const char *reason = NULL;
 
-  g_return_if_fail (page != EPHY_WEB_VIEW_ERROR_PAGE_NONE);
+  g_assert (page != EPHY_WEB_VIEW_ERROR_PAGE_NONE);
 
   view->loading_error_page = TRUE;
   view->error_page = page;
@@ -2566,8 +2566,8 @@ ephy_web_view_load_request (EphyWebView      *view,
   const char *url;
   char *effective_url;
 
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
-  g_return_if_fail (WEBKIT_IS_URI_REQUEST (request));
+  g_assert (EPHY_IS_WEB_VIEW (view));
+  g_assert (WEBKIT_IS_URI_REQUEST (request));
 
   url = webkit_uri_request_get_uri (request);
   effective_url = ephy_embed_utils_normalize_address (url);
@@ -2591,8 +2591,8 @@ ephy_web_view_load_url (EphyWebView *view,
 {
   char *effective_url;
 
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
-  g_return_if_fail (url);
+  g_assert (EPHY_IS_WEB_VIEW (view));
+  g_assert (url);
 
   effective_url = ephy_embed_utils_normalize_address (url);
   if (g_str_has_prefix (effective_url, "javascript:")) {
@@ -2757,7 +2757,7 @@ ephy_web_view_get_navigation_flags (EphyWebView *view)
 const char *
 ephy_web_view_get_status_message (EphyWebView *view)
 {
-  g_return_val_if_fail (EPHY_IS_WEB_VIEW (view), NULL);
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   if (view->link_message && view->link_message[0] != '\0')
     return view->link_message;
@@ -2780,7 +2780,7 @@ ephy_web_view_get_status_message (EphyWebView *view)
 const char *
 ephy_web_view_get_link_message (EphyWebView *view)
 {
-  g_return_val_if_fail (EPHY_IS_WEB_VIEW (view), NULL);
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   return view->link_message;
 }
@@ -2799,7 +2799,7 @@ ephy_web_view_set_link_message (EphyWebView *view,
 {
   char *decoded_address;
 
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   g_free (view->link_message);
 
@@ -2826,7 +2826,7 @@ void
 ephy_web_view_set_security_level (EphyWebView      *view,
                                   EphySecurityLevel level)
 {
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   if (view->security_level != level) {
     view->security_level = level;
@@ -2860,7 +2860,7 @@ ephy_web_view_set_security_level (EphyWebView      *view,
 const char *
 ephy_web_view_get_typed_address (EphyWebView *view)
 {
-  g_return_val_if_fail (EPHY_IS_WEB_VIEW (view), NULL);
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   return view->typed_address;
 }
@@ -2877,7 +2877,7 @@ void
 ephy_web_view_set_typed_address (EphyWebView *view,
                                  const char  *address)
 {
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   g_free (view->typed_address);
   view->typed_address = g_strdup (address);
@@ -2919,7 +2919,7 @@ ephy_web_view_has_modified_forms (EphyWebView        *view,
 {
   GTask *task;
 
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   task = g_task_new (view, cancellable, callback, user_data);
 
@@ -2941,7 +2941,7 @@ ephy_web_view_has_modified_forms_finish (EphyWebView  *view,
                                          GAsyncResult *result,
                                          GError      **error)
 {
-  g_return_val_if_fail (g_task_is_valid (result, view), FALSE);
+  g_assert (g_task_is_valid (result, view));
 
   return g_task_propagate_boolean (G_TASK (result), error);
 }
@@ -2988,7 +2988,7 @@ ephy_web_view_get_best_web_app_icon (EphyWebView        *view,
 {
   GTask *task;
 
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   task = g_task_new (view, cancellable, callback, user_data);
 
@@ -3016,7 +3016,7 @@ ephy_web_view_get_best_web_app_icon_finish (EphyWebView  *view,
   GetBestWebAppIconAsyncData *data;
   GTask *task = G_TASK (result);
 
-  g_return_val_if_fail (g_task_is_valid (result, view), FALSE);
+  g_assert (g_task_is_valid (result, view));
 
   data = g_task_propagate_pointer (task, error);
   if (!data)
@@ -3059,7 +3059,7 @@ ephy_web_view_get_web_app_title (EphyWebView        *view,
 {
   GTask *task;
 
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   task = g_task_new (view, cancellable, callback, user_data);
 
@@ -3081,7 +3081,7 @@ ephy_web_view_get_web_app_title_finish (EphyWebView  *view,
                                         GAsyncResult *result,
                                         GError      **error)
 {
-  g_return_val_if_fail (g_task_is_valid (result, view), NULL);
+  g_assert (g_task_is_valid (result, view));
 
   return g_task_propagate_pointer (G_TASK (result), error);
 }
@@ -3103,7 +3103,7 @@ ephy_web_view_get_security_level (EphyWebView          *view,
                                   GTlsCertificate     **certificate,
                                   GTlsCertificateFlags *errors)
 {
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   if (level)
     *level = view->security_level;
@@ -3168,7 +3168,7 @@ ephy_web_view_print (EphyWebView *view)
   EphyEmbedShell *shell;
   GtkPrintSettings *settings;
 
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   shell = ephy_embed_shell_get_default ();
 
@@ -3253,8 +3253,8 @@ ephy_web_view_save (EphyWebView *view, const char *uri)
 {
   GFile *file;
 
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
-  g_return_if_fail (uri);
+  g_assert (EPHY_IS_WEB_VIEW (view));
+  g_assert (uri);
 
   file = g_file_new_for_uri (uri);
 
@@ -3284,7 +3284,7 @@ ephy_web_view_load_homepage (EphyWebView *view)
   EphyEmbedShellMode mode;
   char *home;
 
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   shell = ephy_embed_shell_get_default ();
   mode = ephy_embed_shell_get_mode (shell);
@@ -3311,7 +3311,7 @@ ephy_web_view_load_new_tab_page (EphyWebView *view)
   EphyEmbedShell *shell;
   EphyEmbedShellMode mode;
 
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   shell = ephy_embed_shell_get_default ();
   mode = ephy_embed_shell_get_mode (shell);
@@ -3333,7 +3333,7 @@ ephy_web_view_load_new_tab_page (EphyWebView *view)
 EphyHistoryPageVisitType
 ephy_web_view_get_visit_type (EphyWebView *view)
 {
-  g_return_val_if_fail (EPHY_IS_WEB_VIEW (view), EPHY_PAGE_VISIT_NONE);
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   return view->visit_type;
 }
@@ -3349,7 +3349,7 @@ ephy_web_view_get_visit_type (EphyWebView *view)
 void
 ephy_web_view_set_visit_type (EphyWebView *view, EphyHistoryPageVisitType visit_type)
 {
-  g_return_if_fail (EPHY_IS_WEB_VIEW (view));
+  g_assert (EPHY_IS_WEB_VIEW (view));
 
   view->visit_type = visit_type;
 }
diff --git a/embed/web-extension/ephy-embed-form-auth.c b/embed/web-extension/ephy-embed-form-auth.c
index 734ce86..dfd236d 100644
--- a/embed/web-extension/ephy-embed-form-auth.c
+++ b/embed/web-extension/ephy-embed-form-auth.c
@@ -72,7 +72,7 @@ ephy_embed_form_auth_new (WebKitWebPage *web_page,
 {
   EphyEmbedFormAuth *form_auth;
 
-  g_return_val_if_fail (WEBKIT_DOM_IS_NODE (password_node), NULL);
+  g_assert (WEBKIT_DOM_IS_NODE (password_node));
 
   form_auth = EPHY_EMBED_FORM_AUTH (g_object_new (EPHY_TYPE_EMBED_FORM_AUTH, NULL));
 
diff --git a/embed/web-extension/ephy-uri-tester.c b/embed/web-extension/ephy-uri-tester.c
index 4f23792..a22e9ac 100644
--- a/embed/web-extension/ephy-uri-tester.c
+++ b/embed/web-extension/ephy-uri-tester.c
@@ -926,7 +926,7 @@ ephy_uri_tester_load (EphyUriTester *tester)
   GTask *task;
   char **trash;
 
-  g_return_if_fail (EPHY_IS_URI_TESTER (tester));
+  g_assert (EPHY_IS_URI_TESTER (tester));
 
   if (!g_settings_get_boolean (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_ENABLE_ADBLOCK))
     tester->adblock_loaded = TRUE;
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index 97b60ee..122210f 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -1692,7 +1692,7 @@ ephy_web_extension_initialize (EphyWebExtension   *extension,
 {
   GDBusAuthObserver *observer;
 
-  g_return_if_fail (EPHY_IS_WEB_EXTENSION (extension));
+  g_assert (EPHY_IS_WEB_EXTENSION (extension));
 
   if (extension->initialized)
     return;
diff --git a/embed/web-extension/ephy-web-overview-model.c b/embed/web-extension/ephy-web-overview-model.c
index 9718ac9..606e213 100644
--- a/embed/web-extension/ephy-web-overview-model.c
+++ b/embed/web-extension/ephy-web-overview-model.c
@@ -112,7 +112,7 @@ void
 ephy_web_overview_model_set_urls (EphyWebOverviewModel *model,
                                   GList                *urls)
 {
-  g_return_if_fail (EPHY_IS_WEB_OVERVIEW_MODEL (model));
+  g_assert (EPHY_IS_WEB_OVERVIEW_MODEL (model));
 
   g_list_free_full (model->items, (GDestroyNotify)ephy_web_overview_model_item_free);
   model->items = urls;
@@ -122,7 +122,7 @@ ephy_web_overview_model_set_urls (EphyWebOverviewModel *model,
 GList *
 ephy_web_overview_model_get_urls (EphyWebOverviewModel *model)
 {
-  g_return_val_if_fail (EPHY_IS_WEB_OVERVIEW_MODEL (model), NULL);
+  g_assert (EPHY_IS_WEB_OVERVIEW_MODEL (model));
 
   return model->items;
 }
@@ -134,7 +134,7 @@ ephy_web_overview_model_set_url_thumbnail (EphyWebOverviewModel *model,
 {
   const char *thumbnail_path;
 
-  g_return_if_fail (EPHY_IS_WEB_OVERVIEW_MODEL (model));
+  g_assert (EPHY_IS_WEB_OVERVIEW_MODEL (model));
 
   thumbnail_path = ephy_web_overview_model_get_url_thumbnail (model, url);
   if (g_strcmp0 (thumbnail_path, path) == 0)
@@ -148,7 +148,7 @@ const char *
 ephy_web_overview_model_get_url_thumbnail (EphyWebOverviewModel *model,
                                            const char           *url)
 {
-  g_return_val_if_fail (EPHY_IS_WEB_OVERVIEW_MODEL (model), NULL);
+  g_assert (EPHY_IS_WEB_OVERVIEW_MODEL (model));
 
   return g_hash_table_lookup (model->thumbnails, url);
 }
@@ -161,7 +161,7 @@ ephy_web_overview_model_set_url_title (EphyWebOverviewModel *model,
   GList *l;
   gboolean changed = FALSE;
 
-  g_return_if_fail (EPHY_IS_WEB_OVERVIEW_MODEL (model));
+  g_assert (EPHY_IS_WEB_OVERVIEW_MODEL (model));
 
   for (l = model->items; l; l = g_list_next (l)) {
     EphyWebOverviewModelItem *item = (EphyWebOverviewModelItem *)l->data;
@@ -188,7 +188,7 @@ ephy_web_overview_model_delete_url (EphyWebOverviewModel *model,
   GList *l;
   gboolean changed = FALSE;
 
-  g_return_if_fail (EPHY_IS_WEB_OVERVIEW_MODEL (model));
+  g_assert (EPHY_IS_WEB_OVERVIEW_MODEL (model));
 
   l = model->items;
   while (l) {
@@ -216,7 +216,7 @@ ephy_web_overview_model_delete_host (EphyWebOverviewModel *model,
   GList *l;
   gboolean changed = FALSE;
 
-  g_return_if_fail (EPHY_IS_WEB_OVERVIEW_MODEL (model));
+  g_assert (EPHY_IS_WEB_OVERVIEW_MODEL (model));
 
   l = model->items;
   while (l) {
@@ -242,7 +242,7 @@ ephy_web_overview_model_delete_host (EphyWebOverviewModel *model,
 void
 ephy_web_overview_model_clear (EphyWebOverviewModel *model)
 {
-  g_return_if_fail (EPHY_IS_WEB_OVERVIEW_MODEL (model));
+  g_assert (EPHY_IS_WEB_OVERVIEW_MODEL (model));
 
   if (!model->items)
     return;
diff --git a/embed/web-extension/ephy-web-overview.c b/embed/web-extension/ephy-web-overview.c
index cd9447b..92b8af1 100644
--- a/embed/web-extension/ephy-web-overview.c
+++ b/embed/web-extension/ephy-web-overview.c
@@ -441,8 +441,8 @@ EphyWebOverview *
 ephy_web_overview_new (WebKitWebPage        *web_page,
                        EphyWebOverviewModel *model)
 {
-  g_return_val_if_fail (WEBKIT_IS_WEB_PAGE (web_page), NULL);
-  g_return_val_if_fail (EPHY_IS_WEB_OVERVIEW_MODEL (model), NULL);
+  g_assert (WEBKIT_IS_WEB_PAGE (web_page));
+  g_assert (EPHY_IS_WEB_OVERVIEW_MODEL (model));
 
   return g_object_new (EPHY_TYPE_WEB_OVERVIEW,
                        "web-page", web_page,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]