[Webkit-unassigned] [Bug 96477] [WK2][GTK] Add API to get the favicon for a WebKitWebView
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Sep 30 01:00:07 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=96477
--- Comment #6 from Carlos Garcia Campos <cgarcia at igalia.com> 2012-09-30 01:00:32 PST ---
(From update of attachment 165591)
View in context: https://bugs.webkit.org/attachment.cgi?id=165591&action=review
> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:297
> + WebKitWebViewPrivate* priv = webView->priv;
> + WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(priv->context);
I've noticed another minor detail here, you could move the webkit_web_context_get_favicon_database() after the early return, since most of the times you won't need the database.
> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:314
> + WebKitWebViewPrivate* priv = webView->priv;
> + WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(priv->context);
> +
> + if (priv->watchForChangesInFaviconHandlerID)
> + g_signal_handler_disconnect(database, priv->watchForChangesInFaviconHandlerID);
> + priv->watchForChangesInFaviconHandlerID = 0;
Similar here. You could use an early return:
WebKitWebViewPrivate* priv = webView->priv;
if (!priv->watchForChangesInFaviconHandlerID)
return;
WebKitFaviconDatabase* database = webkit_web_context_get_favicon_database(priv->context);
g_signal_handler_disconnect(database, priv->watchForChangesInFaviconHandlerID);
priv->watchForChangesInFaviconHandlerID = 0;
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list