[webkit-gtk] Handling Plugins and Error scanning plugin
Michael Catanzaro
mcatanzaro at igalia.com
Tue Jan 20 16:00:47 PST 2015
On Tue, Jan 20, 2015 at 3:13 PM, Nicolas Jäger
<jagernicolas at legtux.org> wrote:
> void
> callback(
> )
> {
> GList *plugin_list, *p;
> GAsyncResult *result;
> plugin_list = webkit_web_context_get_plugins_finish ( web_context,
> result, nullptr );
Hi,
The GAsyncResult you're passing to
webkit_web_context_get_plugins_finish() is uninitialized. It's passed
as the second argument to your callback, so you should declare at least
that many parameters.
You should also pass a GError unless you're sure you want to silence
errors. Something like this is typical:
void callback(GObject *source_object, GAsyncResult *res, gpointer
user_data)
{
WebKitWebContext *web_context = WEBKIT_WEB_CONTEXT(source_object);
GError *error = nullptr;
GList *plugin_list =
webkit_web_context_get_plugins_finish(web_context, res, &error);
if (error)
// handle error
}
Take a look at the documentation for GAsyncResult [1].
[1] https://developer.gnome.org/gio/stable/GAsyncResult.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20150120/25aceb23/attachment.html>
More information about the webkit-gtk
mailing list