After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795497 - Update JavaScriptCore API bindings
Update JavaScriptCore API bindings
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings: GTK+ GStreamer WebKitGTK+
unspecified
Other Linux
: Normal normal
: 0.42
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2018-04-24 01:06 UTC by Michael Catanzaro
Modified: 2018-04-24 14:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
webkit2gtk-4.0: Add JSC namespace to javascriptcoregtk-4.0 and fix depends (14.64 KB, patch)
2018-04-24 06:54 UTC, Rico Tzschichholz
committed Details | Review

Description Michael Catanzaro 2018-04-24 01:06:15 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.)
Comment 1 Rico Tzschichholz 2018-04-24 06:54:53 UTC
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
Comment 2 Michael Catanzaro 2018-04-24 12:44:27 UTC
Review of attachment 371311 [details] [review]:

That looks sane, thanks!
Comment 3 Rico Tzschichholz 2018-04-24 14:19:02 UTC
Attachment 371311 [details] pushed as 2d8150d - webkit2gtk-4.0: Add JSC namespace to javascriptcoregtk-4.0 and fix depends