[Webkit-unassigned] [Bug 117153] [GTK] Migrate WebKitWebContext to GTask

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 4 06:27:16 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=117153





--- Comment #6 from Dan Winship <danw at gnome.org>  2013-06-04 06:25:49 PST ---
(From update of attachment 203663)
View in context: https://bugs.webkit.org/attachment.cgi?id=203663&action=review

OK. Belatedly I notice that this has the same issue as the other bug; you're passing back one data structure via the GTask, and then converting it into a different data structure in the _finish function, when you could instead just be creating the final data structure in webkitWebContextGetPluginThread() and returning it directly. You'd still need to write your own GDestroyNotify though, so this wouldn't actually simplify anything, it just moves code around. (But stylistically, my theory was that GTask _finish functions should almost always consist of only a call to g_task_propagate_something().

> Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:498
> +static void deletePluginsVector(void* ptr)
> +{
> +    delete static_cast<Vector<PluginModuleInfo>*>(ptr);
> +}

Hm... I bet you could do cool code-autogenerating things with GTask and templates, a la GRefPtr... :)

-- 
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