Bug 114710

Summary: [GTK] JSCore.gir.in has a few problems
Product: WebKit Reporter: Martin Robinson <mrobinson>
Component: WebKitGTKAssignee: Martin Robinson <mrobinson>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue, gustavo, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.