[Webkit-unassigned] [Bug 178901] [WPE] Make it introspectable

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 4 02:45:46 PDT 2022


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

--- Comment #2 from Adrian Perez <aperez at igalia.com> ---
After bug #226662 now it is possible to use WPEWebKit from other
languages via GObject-Introspection. As you can see in the transcript
of a Python session below, things work as expected, modulo the fact
that we do not currently have any WPE backend which would be itself
introspectable:

>>> from gi.repository import WPEJavaScriptCore as JSC
<stdin>:1: PyGIWarning: WPEJavaScriptCore was imported without specifying a version first. Use gi.require_version('WPEJavaScriptCore', '1.1') before import to ensure that the right version gets loaded.
>>> JSC
<IntrospectionModule 'WPEJavaScriptCore' from '/home/aperez/WebKit/_wpep/lib/girepository-1.0/WPEJavaScriptCore-1.1.typelib'>
>>> ctx = JSC.Context.new()
>>> v = ctx.evaluate("new Date();", -1)
>>> v.to_string()
'Mon Apr 04 2022 12:30:53 GMT+0300 (EEST)'

>>> from gi.repository import WPEWebKit as WK 
<stdin>:1: PyGIWarning: WPEWebKit was imported without specifying a version first. Use gi.require_version('WPEWebKit', '1.1') before import to ensure that the right version gets loaded.
>>> context = WK.WebContext.new_ephemeral()
>>> context
<WPEWebKit.WebContext object at 0x7fbc28475040 (WebKitWebContext at 0x55cad3a4b0f0)>
>>> backend = WK.WebViewBackend.new(None, None, None)
** (process:2742041): WARNING **: 12:32:35.580: (../pygobject/gi/pygi-basictype.c:78):marshal_from_py_void: runtime check failed: (arg_cache->transfer == GI_TRANSFER_NOTHING)

** (process:2742041): CRITICAL **: 12:32:35.580: WebKitWebViewBackend* webkit_web_view_backend_new(wpe_view_backend*, GDestroyNotify, gpointer): assertion 'backend' failed
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: constructor returned NULL

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220404/12ab3b88/attachment-0001.htm>


More information about the webkit-unassigned mailing list