wpe: enable console message with WPE2

Looks like the WebKitConsoleMessage API is now available in WPE2 as well:
https://webkitgtk.org/reference/webkitgtk-web-process-extension/stable/signal.WebPage.console-message-sent.html

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8169>
This commit is contained in:
Guillaume Desmottes 2024-12-17 17:36:19 +01:00 committed by GStreamer Marge Bot
parent bebfbb6f69
commit 219bf89159

View file

@ -45,7 +45,6 @@ G_MODULE_EXPORT void extension_initialize (WebKitWebExtension * extension);
static WebKitWebExtension *global_extension = NULL;
#if !USE_WPE2
static void
console_message_cb (WebKitWebPage * page,
WebKitConsoleMessage * console_message, gpointer data)
@ -56,17 +55,13 @@ console_message_cb (WebKitWebPage * page,
NULL);
g_free (message);
}
#endif
static void
web_page_created_callback (WebKitWebExtension * extension,
WebKitWebPage * web_page, gpointer data)
{
// WebKitConsoleMessage is deprecated in wpe1 and has no replacement in wpe2.
#if !USE_WPE2
g_signal_connect (web_page, "console-message-sent",
G_CALLBACK (console_message_cb), NULL);
#endif
}
void