GNOME Bugzilla – Bug 795497
Update JavaScriptCore API bindings
Last modified: 2018-04-24 14:19:07 UTC
Hi, I'm looking over https://git.gnome.org/browse/vala/commit/?id=f935ba409b0a4e4a340103a464136b297de53cb4. A couple of the new bindings are wrong. I immediately notice that the return type is wrong for JavascriptResult.get_js_value() (it returns a JSCValue, not a JSValueRef/JS.Value) and the Frame.get_js_context() series of functions (which return a JSCContext, not a JSGlobalContextRef). This 2.21.1 is a pretty major release because it introduces a new GObject-based API for JavaScriptCore. The cross-platform C API is now deprecated in WebKitGTK+. JSValueRef and JSGlobalContextRef are now deprecated in favor of JSCValue and JSCContext. You're going to want to deprecate JS.Value and JS.GlobalContext in the Vala bindings. There new API should use the JSC namespace instead. It's documented at https://webkitgtk.org/reference/jsc-glib/unstable/index.html and it should be *mostly* introspectable at this point. (Carlos is still planning to add introspectable alternatives to the variadic functions.)
Created attachment 371311 [details] [review] webkit2gtk-4.0: Add JSC namespace to javascriptcoregtk-4.0 and fix depends Make JS namespace deprecated since 2.22 accordingly
Review of attachment 371311 [details] [review]: That looks sane, thanks!
Attachment 371311 [details] pushed as 2d8150d - webkit2gtk-4.0: Add JSC namespace to javascriptcoregtk-4.0 and fix depends