Bug 114710 - [GTK] JSCore.gir.in has a few problems
Summary: [GTK] JSCore.gir.in has a few problems
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Martin Robinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-16 15:43 PDT by Martin Robinson
Modified: 2013-04-22 08:45 PDT (History)
4 users (show)

See Also:


Attachments
Patch (12.96 KB, patch)
2013-04-19 10:37 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2013-04-16 15:43:55 PDT
There are a few issues with the JSCore.gir.in. It's essentially a stub file that enables introspection of APIs, but is mostly incomplete. JavaScriptCore isn't a GObject API, which suggests that using it will lead to memory errors. Instead it should likely be a "foreign" library defined like https://git.gnome.org/browse/gobject-introspection/tree/gir/cairo-1.0.gir.in. It references the libwebkitgtk library when it should really be referencing libjavascriptcoregtk.
Comment 1 Martin Robinson 2013-04-19 10:37:15 PDT
Created attachment 198897 [details]
Patch
Comment 2 Martin Robinson 2013-04-19 10:54:46 PDT
Comment on attachment 198897 [details]
Patch

Clearing flags on attachment: 198897

Committed r148755: <http://trac.webkit.org/changeset/148755>
Comment 3 Martin Robinson 2013-04-19 10:54:49 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Carlos Garcia Campos 2013-04-20 00:52:19 PDT
Comment on attachment 198897 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=198897&action=review

Nice cleanup!

> Source/JavaScriptCore/GNUmakefile.am:211
> +CLEANFILES += JavaScriptCore-@WEBKITGTK_API_VERSION@.gir JavaScriptCore-@WEBKITGTK_API_VERSION@.typelib

Now that gir_DATA and typelibs_DATA are common and global, I wonder if we could simply add CLEANFILES += $(gir_DATA) $(typelibs_DATA) to the main makefile and we don't need to do it for every GIR.

> Source/WebKit/gtk/GNUmakefile.am:-356
> -EXTRA_DIST += $(top_builddir)/Source/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
> -

This is no longer needed? Have you checked this patch doesn't break distcheck?
Comment 5 Martin Robinson 2013-04-22 08:45:34 PDT
(In reply to comment #4)
> (From update of attachment 198897 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=198897&action=review
> 
> Nice cleanup!
> 
> > Source/JavaScriptCore/GNUmakefile.am:211
> > +CLEANFILES += JavaScriptCore-@WEBKITGTK_API_VERSION@.gir JavaScriptCore-@WEBKITGTK_API_VERSION@.typelib
> 
> Now that gir_DATA and typelibs_DATA are common and global, I wonder if we could simply add CLEANFILES += $(gir_DATA) $(typelibs_DATA) to the main makefile and we don't need to do it for every GIR.

I wonder if we'll need to split the introspection bits of the main makefile up for that -- one before the includes and one after.

> > Source/WebKit/gtk/GNUmakefile.am:-356
> > -EXTRA_DIST += $(top_builddir)/Source/WebKit/gtk/JSCore-@WEBKITGTK_API_VERSION@.gir
> > -
> 
> This is no longer needed? Have you checked this patch doesn't break distcheck?

'make dist' is broken at the moment, but I double-checked that Source/JavaScriptCore/JavaScriptCore.gir.in was in DIST_COMMON in the makefile. If AC_CONFIG_FILE doesn't automatically dist the source files, we'd need to put the other files used in AC_CONFIG_FILES in EXTRA_DIST as well.