[epiphany] ephy-shell: add g_return_val_if_fails to ephy_shell_new_tab_full



commit 21c195f175176781065124e676c5e6654825ee76
Author: Xan Lopez <xan igalia com>
Date:   Sat Feb 9 18:11:22 2013 +0100

    ephy-shell: add g_return_val_if_fails to ephy_shell_new_tab_full

 src/ephy-shell.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 85a92eb..7fd01d7 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -736,6 +736,15 @@ ephy_shell_new_tab_full (EphyShell *shell,
   gboolean is_empty = FALSE;
   int position = -1;
 
+  g_return_val_if_fail (EPHY_IS_SHELL (shell), NULL);
+  g_return_val_if_fail (EPHY_IS_WINDOW (parent_window) || !parent_window, NULL);
+  g_return_val_if_fail (EPHY_IS_EMBED (previous_embed) || !previous_embed, NULL);
+#ifdef HAVE_WEBKIT2
+  g_return_val_if_fail (WEBKIT_IS_URI_REQUEST (request) || !request, NULL);
+#else
+  g_return_val_if_fail (WEBKIT_IS_NETWORK_REQUEST (request) || !request, NULL);
+#endif
+
   embed_shell = EPHY_EMBED_SHELL (shell);
 
   if (flags & EPHY_NEW_TAB_OPEN_PAGE) open_page = TRUE;


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