[Webkit-unassigned] [Bug 67931] [GTK] Add WebKitWebContext to GTK API
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 20 15:15:07 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=67931
--- Comment #8 from Martin Robinson <mrobinson at webkit.org> 2011-09-20 15:15:07 PST ---
(From update of attachment 108001)
View in context: https://bugs.webkit.org/attachment.cgi?id=108001&action=review
> Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:74
> + static GOnce onceInit = G_ONCE_INIT;
> + return WEBKIT_WEB_CONTEXT(g_once(&onceInit, getDefaultWebContext, 0));
Out of curiosity does GOnce require that GObject be created in another function. I'm not sure I understand the benefit over something like this:
static WebKitWebContext* webContext = 0;
if (webContext)
return webContext;
webContext = WEBKIT_WEB_CONTEXT(g_object_new(WEBKIT_TYPE_WEB_CONTEXT, NULL));
webContext->priv->context = WKContextGetSharedProcessContext();
WKContextSetCacheModel(webContext->priv->context, kWKCacheModelPrimaryWebBrowser);
return webContext;
It's fewer lines and clearer.
--
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