Hello community,

here is the log from the commit of package gjs for openSUSE:Factory checked in 
at 2016-03-29 14:27:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gjs (Old)
 and      /work/SRC/openSUSE:Factory/.gjs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gjs"

Changes:
--------
--- /work/SRC/openSUSE:Factory/gjs/gjs.changes  2015-11-06 00:10:40.000000000 
+0100
+++ /work/SRC/openSUSE:Factory/.gjs.new/gjs.changes     2016-03-29 
14:27:38.000000000 +0200
@@ -1,0 +2,16 @@
+Fri Dec  18 23:51:08 UTC 2015 - [email protected]
+
+- Update to version 1.45.3:
+  + Support external construction of gjs-defined GObjects
+    (bgo#681254).
+  + Add new format.printf() API (bgo#689664).
+  + Add new API to get the name of a repository (bgo#685413).
+  + Add C to JS support for arrays of flat structures (bgo#704842).
+  + Add API to specify CSS node name (bgo#758349).
+  + Return value of default signal handler for "on_signal_name" 
+    (bgo#729288).
+  + Fix multiple emissions of onOverwrite in Tweener (bgo#597927).
+  + Misc bug fixes: bgo#727370, bgo#623330, bgo#667908,
+    bgo#757763.
+
+-------------------------------------------------------------------

Old:
----
  gjs-1.44.0.tar.xz

New:
----
  gjs-1.45.3.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gjs.spec ++++++
--- /var/tmp/diff_new_pack.ECIi5a/_old  2016-03-29 14:27:39.000000000 +0200
+++ /var/tmp/diff_new_pack.ECIi5a/_new  2016-03-29 14:27:39.000000000 +0200
@@ -17,14 +17,14 @@
 
 
 Name:           gjs
-Version:        1.44.0
+Version:        1.45.3
 Release:        0
 # FIXME: find out if tapsets should really be in devel package or in main 
package
 Summary:        JavaScript bindings based on gobject-introspection and Mozilla
 License:        MIT
 Group:          Development/Libraries/GNOME
 Url:            http://live.gnome.org/Gjs
-Source:         
http://download.gnome.org/sources/gjs/1.44/%{name}-%{version}.tar.xz
+Source:         
http://download.gnome.org/sources/gjs/1.45/%{name}-%{version}.tar.xz
 BuildRequires:  gcc-c++
 BuildRequires:  python
 BuildRequires:  readline-devel

++++++ gjs-1.44.0.tar.xz -> gjs-1.45.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/Makefile-insttest.am 
new/gjs-1.45.3/Makefile-insttest.am
--- old/gjs-1.44.0/Makefile-insttest.am 2015-10-27 23:08:41.000000000 +0100
+++ new/gjs-1.45.3/Makefile-insttest.am 2015-10-28 01:07:09.000000000 +0100
@@ -59,8 +59,8 @@
 
 nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c 
$(GI_DATADIR)/tests/regress.h
 libregress_la_CPPFLAGS = $(AM_CPPFLAGS)
-libregress_la_CFLAGS = $(GJS_CFLAGS)
-libregress_la_LDFLAGS = $(common_test_ldflags)
+libregress_la_CFLAGS = $(GJS_CFLAGS) $(GJS_GDBUS_CFLAGS)
+libregress_la_LDFLAGS = $(common_test_ldflags) $(GJS_GDBUS_LIBS)
 libregress_la_LIBADD = $(common_test_libadd)
 libregress_scannerflags_includes = --include=Gio-2.0
 if ENABLE_CAIRO
@@ -142,6 +142,7 @@
        installed-tests/js/testLocale.js                        \
        installed-tests/js/testMainloop.js                      \
        installed-tests/js/testMetaClass.js                     \
+       installed-tests/js/testNamespace.js                     \
        installed-tests/js/testParamSpec.js                     \
        installed-tests/js/testReflectObject.js                 \
        installed-tests/js/testSignals.js                       \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/Makefile.in new/gjs-1.45.3/Makefile.in
--- old/gjs-1.44.0/Makefile.in  2015-10-27 23:08:58.000000000 +0100
+++ new/gjs-1.45.3/Makefile.in  2015-12-18 17:36:23.000000000 +0100
@@ -145,6 +145,7 @@
 @BUILDOPT_INSTALL_TESTS_TRUE@  installed-tests/js/testLocale.js                
        \
 @BUILDOPT_INSTALL_TESTS_TRUE@  installed-tests/js/testMainloop.js              
        \
 @BUILDOPT_INSTALL_TESTS_TRUE@  installed-tests/js/testMetaClass.js             
        \
+@BUILDOPT_INSTALL_TESTS_TRUE@  installed-tests/js/testNamespace.js             
        \
 @BUILDOPT_INSTALL_TESTS_TRUE@  installed-tests/js/testParamSpec.js             
        \
 @BUILDOPT_INSTALL_TESTS_TRUE@  installed-tests/js/testReflectObject.js         
        \
 @BUILDOPT_INSTALL_TESTS_TRUE@  installed-tests/js/testSignals.js               
        \
@@ -438,6 +439,7 @@
        installed-tests/js/testLocale.js \
        installed-tests/js/testMainloop.js \
        installed-tests/js/testMetaClass.js \
+       installed-tests/js/testNamespace.js \
        installed-tests/js/testParamSpec.js \
        installed-tests/js/testReflectObject.js \
        installed-tests/js/testSignals.js \
@@ -934,8 +936,10 @@
 common_test_libadd = $(GJS_LIBS)
 nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c 
$(GI_DATADIR)/tests/regress.h
 libregress_la_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_16)
-libregress_la_CFLAGS = $(GJS_CFLAGS) $(am__append_13)
-libregress_la_LDFLAGS = $(common_test_ldflags) $(am__append_14)
+libregress_la_CFLAGS = $(GJS_CFLAGS) $(GJS_GDBUS_CFLAGS) \
+       $(am__append_13)
+libregress_la_LDFLAGS = $(common_test_ldflags) $(GJS_GDBUS_LIBS) \
+       $(am__append_14)
 libregress_la_LIBADD = $(common_test_libadd)
 libregress_scannerflags_includes = --include=Gio-2.0 $(am__append_15)
 nodist_libwarnlib_la_SOURCES = $(GI_DATADIR)/tests/warnlib.c 
$(GI_DATADIR)/tests/warnlib.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/NEWS new/gjs-1.45.3/NEWS
--- old/gjs-1.44.0/NEWS 2015-10-27 23:25:05.000000000 +0100
+++ new/gjs-1.45.3/NEWS 2015-12-18 17:35:47.000000000 +0100
@@ -1,3 +1,19 @@
+Version 1.45.3
+--------------
+
+- Support external construction of gjs-defined GObjects [Florian Müllner,
+  #681254]
+- Add new format.printf() API [Colin Walters, #689664]
+- Add new API to get the name of a repository [Jasper St. Pierre, #685413]
+- Add C to JS support for arrays of flat structures [Giovanni Campagna,
+  #704842]
+- Add API to specify CSS node name [Florian Müllner, #758349]
+- Return value of default signal handler for "on_signal_name" methods
+  [Philip Chimento, #729288]
+- Fix multiple emissions of onOverwrite in Tweener [Tommi Komulainen, #597927]
+- Misc bug fixes [Philip Chimento, #727370] [Owen Taylor, #623330]
+  [Juan RP, #667908] [Ben Iofel, #757763]
+
 Version 1.44.0
 --------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/configure new/gjs-1.45.3/configure
--- old/gjs-1.44.0/configure    2015-10-27 23:08:57.000000000 +0100
+++ new/gjs-1.45.3/configure    2015-12-18 17:36:22.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gjs 1.44.0.
+# Generated by GNU Autoconf 2.69 for gjs 1.45.3.
 #
 # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=gjs>.
 #
@@ -591,8 +591,8 @@
 # Identity of this package.
 PACKAGE_NAME='gjs'
 PACKAGE_TARNAME='gjs'
-PACKAGE_VERSION='1.44.0'
-PACKAGE_STRING='gjs 1.44.0'
+PACKAGE_VERSION='1.45.3'
+PACKAGE_STRING='gjs 1.45.3'
 PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gjs'
 PACKAGE_URL=''
 
@@ -1408,7 +1408,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures gjs 1.44.0 to adapt to many kinds of systems.
+\`configure' configures gjs 1.45.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1478,7 +1478,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gjs 1.44.0:";;
+     short | recursive ) echo "Configuration of gjs 1.45.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1637,7 +1637,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gjs configure 1.44.0
+gjs configure 1.45.3
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2127,7 +2127,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by gjs $as_me 1.44.0, which was
+It was created by gjs $as_me 1.45.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2990,7 +2990,7 @@
 
 # Define the identity of the package.
  PACKAGE='gjs'
- VERSION='1.44.0'
+ VERSION='1.45.3'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3205,7 +3205,7 @@
 
 
 
-$as_echo "#define GJS_VERSION (1 * 100 + 44) * 100 + 0" >>confdefs.h
+$as_echo "#define GJS_VERSION (1 * 100 + 45) * 100 + 3" >>confdefs.h
 
 
 GETTEXT_PACKAGE=gjs
@@ -16779,10 +16779,10 @@
 
 
 
-common_packages="gmodule-2.0 gthread-2.0 gio-2.0 >= 2.36.0 mozjs-24"
+common_packages="gmodule-2.0 gthread-2.0 gio-2.0 >= 2.42.0 mozjs-24"
 gjs_packages="gobject-introspection-1.0 libffi $common_packages"
 gjs_cairo_packages="cairo cairo-gobject $common_packages"
-gjs_gdbus_packages="gobject-2.0 >= 2.36.0 gio-2.0"
+gjs_gdbus_packages="gobject-2.0 >= 2.42.0 gio-2.0"
 gjs_gtk_packages="gtk+-3.0"
 # gjs-tests links against everything
 gjstests_packages="gio-unix-2.0 $gjs_packages"
@@ -16796,12 +16796,12 @@
     pkg_cv_GOBJECT_CFLAGS="$GOBJECT_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists 
--print-errors \"gobject-2.0 >= 2.36.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gobject-2.0 >= 2.36.0") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists 
--print-errors \"gobject-2.0 >= 2.42.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gobject-2.0 >= 2.42.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 >= 2.36.0" 
2>/dev/null`
+  pkg_cv_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 >= 2.42.0" 
2>/dev/null`
                      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -16813,12 +16813,12 @@
     pkg_cv_GOBJECT_LIBS="$GOBJECT_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists 
--print-errors \"gobject-2.0 >= 2.36.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gobject-2.0 >= 2.36.0") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists 
--print-errors \"gobject-2.0 >= 2.42.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gobject-2.0 >= 2.42.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0 >= 2.36.0" 2>/dev/null`
+  pkg_cv_GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0 >= 2.42.0" 2>/dev/null`
                      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -16839,14 +16839,14 @@
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors 
--cflags --libs "gobject-2.0 >= 2.36.0" 2>&1`
+               GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors 
--cflags --libs "gobject-2.0 >= 2.42.0" 2>&1`
         else
-               GOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs 
"gobject-2.0 >= 2.36.0" 2>&1`
+               GOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs 
"gobject-2.0 >= 2.42.0" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$GOBJECT_PKG_ERRORS" >&5
 
-       as_fn_error $? "Package requirements (gobject-2.0 >= 2.36.0) were not 
met:
+       as_fn_error $? "Package requirements (gobject-2.0 >= 2.42.0) were not 
met:
 
 $GOBJECT_PKG_ERRORS
 
@@ -18340,7 +18340,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by gjs $as_me 1.44.0, which was
+This file was extended by gjs $as_me 1.45.3, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -18406,7 +18406,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-gjs config.status 1.44.0
+gjs config.status 1.45.3
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/configure.ac new/gjs-1.45.3/configure.ac
--- old/gjs-1.44.0/configure.ac 2015-10-27 23:08:41.000000000 +0100
+++ new/gjs-1.45.3/configure.ac 2015-12-18 17:35:47.000000000 +0100
@@ -2,8 +2,8 @@
 # Process this file with autoconf to produce a configure script.
 
 m4_define(pkg_major_version, 1)
-m4_define(pkg_minor_version, 44)
-m4_define(pkg_micro_version, 0)
+m4_define(pkg_minor_version, 45)
+m4_define(pkg_micro_version, 3)
 m4_define(pkg_version, pkg_major_version.pkg_minor_version.pkg_micro_version)
 m4_define(pkg_int_version, (pkg_major_version * 100 + pkg_minor_version) * 100 
+ pkg_micro_version)
 
@@ -68,7 +68,7 @@
 AM_CONDITIONAL([ENABLE_COVERAGE], [test x$enable_coverage = xyes])
 
 # Checks for libraries.
-m4_define(glib_required_version, 2.36.0)
+m4_define(glib_required_version, 2.42.0)
 
 AC_CHECK_HEADERS([malloc.h])
 AC_CHECK_FUNCS(mallinfo)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/gi/arg.cpp new/gjs-1.45.3/gi/arg.cpp
--- old/gjs-1.44.0/gi/arg.cpp   2015-06-12 01:26:38.000000000 +0200
+++ new/gjs-1.45.3/gi/arg.cpp   2015-10-28 02:39:59.000000000 +0100
@@ -255,6 +255,11 @@
             needs_release = FALSE;
             break;
 
+        case GI_INFO_TYPE_STRUCT:
+        case GI_INFO_TYPE_UNION:
+            needs_release = g_type_info_is_pointer (type_info);
+            break;
+
         default:
             needs_release = TRUE;
         }
@@ -2157,11 +2162,42 @@
         case GI_TYPE_TAG_DOUBLE:
           ITERATE(double);
           break;
+        case GI_TYPE_TAG_INTERFACE: {
+          GIBaseInfo *interface_info;
+          GIInfoType info_type;
+
+          interface_info = g_type_info_get_interface (param_info);
+          info_type = g_base_info_get_type (interface_info);
+
+          if ((info_type == GI_INFO_TYPE_STRUCT ||
+               info_type == GI_INFO_TYPE_UNION) &&
+              !g_type_info_is_pointer (param_info)) {
+              gsize struct_size;
+
+              if (info_type == GI_INFO_TYPE_UNION)
+                  struct_size = g_union_info_get_size 
((GIUnionInfo*)interface_info);
+              else
+                  struct_size = g_struct_info_get_size 
((GIStructInfo*)interface_info);
+
+              for (i = 0; i < length; i++) {
+                  arg.v_pointer = ((char*)array) + struct_size;
+
+                  if (!gjs_value_from_g_argument(context, &elem, param_info, 
&arg, TRUE))
+                      goto finally;
+                  if (!JS_DefineElement(context, obj, i, elem, NULL, NULL,
+                                        JSPROP_ENUMERATE))
+                      goto finally;
+              }
+
+              break;
+          }
+
+          /* fallthrough */
+        }
         case GI_TYPE_TAG_GTYPE:
         case GI_TYPE_TAG_UTF8:
         case GI_TYPE_TAG_FILENAME:
         case GI_TYPE_TAG_ARRAY:
-        case GI_TYPE_TAG_INTERFACE:
         case GI_TYPE_TAG_GLIST:
         case GI_TYPE_TAG_GSLIST:
         case GI_TYPE_TAG_GHASH:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/gi/ns.cpp new/gjs-1.45.3/gi/ns.cpp
--- old/gjs-1.44.0/gi/ns.cpp    2015-10-27 23:08:41.000000000 +0100
+++ new/gjs-1.45.3/gi/ns.cpp    2015-10-28 01:20:34.000000000 +0100
@@ -124,6 +124,30 @@
     return ret;
 }
 
+static JSBool
+get_name (JSContext *context,
+          JS::HandleObject obj,
+          JS::HandleId id,
+          jsval *vp)
+{
+    Ns *priv;
+    jsval retval;
+    JSBool ret = JS_FALSE;
+
+    priv = priv_from_js(context, obj);
+
+    if (priv == NULL)
+        goto out;
+
+    if (gjs_string_from_utf8(context, priv->gi_namespace, -1, &retval)) {
+        *vp = retval;
+        ret = JS_TRUE;
+    }
+
+ out:
+    return ret;
+}
+
 GJS_NATIVE_CONSTRUCTOR_DEFINE_ABSTRACT(ns)
 
 static void
@@ -165,6 +189,7 @@
 };
 
 JSPropertySpec gjs_ns_proto_props[] = {
+    { "__name__", 0, GJS_MODULE_PROP_FLAGS | JSPROP_READONLY, 
(JSPropertyOp)get_name, NULL },
     { NULL }
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/gi/object.cpp new/gjs-1.45.3/gi/object.cpp
--- old/gjs-1.44.0/gi/object.cpp        2015-10-27 23:08:41.000000000 +0100
+++ new/gjs-1.45.3/gi/object.cpp        2015-12-10 22:42:52.000000000 +0100
@@ -2416,6 +2416,94 @@
 }
 
 static void
+jsobj_set_gproperty (JSContext    *context,
+                     JSObject     *object,
+                     const GValue *value,
+                     GParamSpec   *pspec)
+{
+    jsval jsvalue;
+    gchar *underscore_name;
+
+    if (!gjs_value_from_g_value(context, &jsvalue, value))
+        return;
+
+    underscore_name = hyphen_to_underscore((gchar *)pspec->name);
+    if (!JS_SetProperty(context, object, underscore_name, &jsvalue))
+        gjs_log_exception(context);
+    g_free (underscore_name);
+}
+
+static GObject *
+gjs_object_constructor (GType                  type,
+                        guint                  n_construct_properties,
+                        GObjectConstructParam *construct_properties)
+{
+    GObject *gobj = NULL;
+
+    if (object_init_list) {
+        GType parent_type = g_type_parent(type);
+
+        /* The object is being constructed from JS:
+         * Simply chain up to the first non-gjs constructor
+         */
+        while (G_OBJECT_CLASS(g_type_class_peek(parent_type))->constructor == 
gjs_object_constructor)
+            parent_type = g_type_parent(parent_type);
+
+        gobj = 
G_OBJECT_CLASS(g_type_class_peek(parent_type))->constructor(type, 
n_construct_properties, construct_properties);
+    } else {
+        GjsContext *gjs_context;
+        JSContext *context;
+        JSObject *object, *constructor;
+        ObjectInstance *priv;
+
+        /* The object is being constructed from native code (e.g. GtkBuilder):
+         * Construct the JS object from the constructor, then use the GObject
+         * that was associated in gjs_object_custom_init()
+         */
+        gjs_context = gjs_context_get_current();
+        context = (JSContext*) gjs_context_get_native_context(gjs_context);
+
+        JS_BeginRequest(context);
+
+        constructor = gjs_lookup_object_constructor_from_info(context, NULL, 
type);
+        if (!constructor)
+          goto out;
+
+        if (n_construct_properties) {
+            JSObject *args;
+            jsval argv;
+            guint i;
+
+            args = JS_NewObject(context, NULL, NULL, NULL);
+
+            for (i = 0; i < n_construct_properties; i++)
+                jsobj_set_gproperty(context, args,
+                                    construct_properties[i].value,
+                                    construct_properties[i].pspec);
+
+            argv = OBJECT_TO_JSVAL(args);
+            object = JS_New(context, constructor, 1, &argv);
+        } else {
+            object = JS_New(context, constructor, 0, NULL);
+        }
+
+        if (!object)
+          goto out;
+
+        priv = (ObjectInstance*) JS_GetPrivate(object);
+        /* We only hold a toggle ref at this point, add back a ref that the
+         * native code can own.
+         */
+        gobj = G_OBJECT(g_object_ref(priv->gobj));
+
+out:
+        JS_EndRequest(context);
+    }
+
+    return gobj;
+}
+
+static void
 gjs_object_set_gproperty (GObject      *object,
                           guint         property_id,
                           const GValue *value,
@@ -2424,21 +2512,12 @@
     GjsContext *gjs_context;
     JSContext *context;
     JSObject *js_obj;
-    jsval jsvalue;
-    gchar *underscore_name;
 
     gjs_context = gjs_context_get_current();
     context = (JSContext*) gjs_context_get_native_context(gjs_context);
 
     js_obj = peek_js_obj(object);
-
-    if (!gjs_value_from_g_value(context, &jsvalue, value))
-        return;
-
-    underscore_name = hyphen_to_underscore((gchar *)pspec->name);
-    if (!JS_SetProperty(context, js_obj, underscore_name, &jsvalue))
-        gjs_log_exception(context);
-    g_free (underscore_name);
+    jsobj_set_gproperty(context, js_obj, value, pspec);
 }
 
 static JSBool
@@ -2527,6 +2606,7 @@
 
     gtype = G_OBJECT_CLASS_TYPE (klass);
 
+    klass->constructor = gjs_object_constructor;
     klass->set_property = gjs_object_set_gproperty;
     klass->get_property = gjs_object_get_gproperty;
 
@@ -2554,6 +2634,9 @@
     ObjectInstance *priv;
     jsval v, r;
 
+    if (!object_init_list)
+      return;
+
     object = (JSObject*) object_init_list->data;
     priv = (ObjectInstance*) JS_GetPrivate(object);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/installed-tests/js/testCoverage.js 
new/gjs-1.45.3/installed-tests/js/testCoverage.js
--- old/gjs-1.44.0/installed-tests/js/testCoverage.js   2015-10-27 
23:08:41.000000000 +0100
+++ new/gjs-1.45.3/installed-tests/js/testCoverage.js   2015-12-18 
17:35:47.000000000 +0100
@@ -173,22 +173,6 @@
                       JSUnit.assertEquals);
 }
 
-function testExpressionLinesFoundForCaseStatementsCharacters() {
-    let foundLinesInsideCaseStatements =
-        parseScriptForExpressionLines("var a = 'a';\n" +
-                                      "switch (a) {\n" +
-                                      "case 'a':\n" +
-                                      "    a++;\n" +
-                                      "    break;\n" +
-                                      "case 'b':\n" +
-                                      "    a++;\n" +
-                                      "    break;\n" +
-                                      "}\n");
-    assertArrayEquals(foundLinesInsideCaseStatements,
-                      [1, 2, 4, 5, 7, 8],
-                      JSUnit.assertEquals);
-}
-
 function testExpressionLinesFoundForLoop() {
     let foundLinesInsideLoop =
         parseScriptForExpressionLines("for (let i = 0; i < 1; i++) {\n" +
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/installed-tests/js/testGObjectClass.js 
new/gjs-1.45.3/installed-tests/js/testGObjectClass.js
--- old/gjs-1.44.0/installed-tests/js/testGObjectClass.js       2015-10-27 
23:08:41.000000000 +0100
+++ new/gjs-1.45.3/installed-tests/js/testGObjectClass.js       2015-12-10 
22:17:43.000000000 +0100
@@ -4,13 +4,14 @@
 const Lang = imports.lang;
 const GObject = imports.gi.GObject;
 const Gio = imports.gi.Gio;
+const Gtk = imports.gi.Gtk;
 
 const MyObject = new GObject.Class({
     Name: 'MyObject',
     Properties: {
         'readwrite': GObject.ParamSpec.string('readwrite', 'ParamReadwrite',
                                               'A read write parameter',
-                                              GObject.ParamFlags.READABLE | 
GObject.ParamFlags.WRITABLE,
+                                              GObject.ParamFlags.READWRITE,
                                               ''),
         'readonly': GObject.ParamSpec.string('readonly', 'ParamReadonly',
                                              'A readonly parameter',
@@ -19,7 +20,7 @@
 
         'construct': GObject.ParamSpec.string('construct', 
'ParamConstructOnly',
                                               'A readwrite construct-only 
parameter',
-                                              GObject.ParamFlags.READABLE | 
GObject.ParamFlags.WRITABLE | GObject.ParamFlags.CONSTRUCT_ONLY,
+                                              GObject.ParamFlags.READWRITE | 
GObject.ParamFlags.CONSTRUCT_ONLY,
                                               'default')
     },
     Signals: {
@@ -109,6 +110,11 @@
 
     on_empty: function() {
         this.empty_called = true;
+    },
+
+    on_full: function() {
+        this.full_default_handler_called = true;
+        return 79;
     }
 });
 
@@ -183,6 +189,18 @@
     JSUnit.assertEquals('bar', myInstance2.readonly);
     JSUnit.assertEquals('asdf', myInstance2.construct);
 
+    let ui = '<interface> \
+                <object class="Gjs_MyObject" id="MyObject"> \
+                  <property name="readwrite">baz</property> \
+                  <property name="construct">quz</property> \
+                </object> \
+              </interface>';
+    let builder = Gtk.Builder.new_from_string(ui, -1);
+    let myInstance3 = builder.get_object('MyObject');
+    JSUnit.assertEquals('baz', myInstance3.readwrite);
+    JSUnit.assertEquals('bar', myInstance3.readonly);
+    JSUnit.assertEquals('quz', myInstance3.construct);
+
     // the following would (should) cause a CRITICAL:
     // myInstance.readonly = 'val';
     // myInstance.construct = 'val';
@@ -242,6 +260,7 @@
     let result = myInstance.emit_full();
 
     JSUnit.assertEquals(true, ok);
+    JSUnit.assertUndefined(myInstance.full_default_handler_called);
     JSUnit.assertEquals(42, result);
 
     let stack = [ ];
@@ -337,4 +356,12 @@
     }));
 }
 
+function testDefaultHandler() {
+    let myInstance = new MyObject();
+    let result = myInstance.emit_full();
+
+    JSUnit.assertEquals(true, myInstance.full_default_handler_called);
+    JSUnit.assertEquals(79, result);
+}
+
 JSUnit.gjstestRun(this, JSUnit.setUp, JSUnit.tearDown);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/installed-tests/js/testGtk.js 
new/gjs-1.45.3/installed-tests/js/testGtk.js
--- old/gjs-1.44.0/installed-tests/js/testGtk.js        2015-06-12 
01:26:38.000000000 +0200
+++ new/gjs-1.45.3/installed-tests/js/testGtk.js        2015-10-28 
02:39:59.000000000 +0100
@@ -1,6 +1,7 @@
 #!/usr/bin/env gjs
 
 const ByteArray = imports.byteArray;
+const Gdk = imports.gi.Gdk;
 const Gio = imports.gi.Gio;
 const Gtk = imports.gi.Gtk;
 const Lang = imports.lang;
@@ -92,4 +93,12 @@
     validateTemplate(new MyComplexGtkSubclassFromResource());
 }
 
+// https://bugzilla.gnome.org/show_bug.cgi?id=704842
+function testGdkKeymap() {
+    Gtk.init(null);
+
+    let keymap = Gdk.Keymap.get_default();
+    JSUnit.assertNotEquals(keymap.get_entries_for_keyval(Gdk.KEY_a), null);
+}
+
 JSUnit.gjstestRun(this, JSUnit.setUp, JSUnit.tearDown);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/installed-tests/js/testNamespace.js 
new/gjs-1.45.3/installed-tests/js/testNamespace.js
--- old/gjs-1.44.0/installed-tests/js/testNamespace.js  1970-01-01 
01:00:00.000000000 +0100
+++ new/gjs-1.45.3/installed-tests/js/testNamespace.js  2015-10-28 
01:21:50.000000000 +0100
@@ -0,0 +1,8 @@
+const JSUnit = imports.jsUnit;
+const Everything = imports.gi.Regress;
+
+function testName() {
+    JSUnit.assertEquals(Everything.__name__, "Regress");
+}
+
+JSUnit.gjstestRun(this, JSUnit.setUp, JSUnit.tearDown);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/installed-tests/js/testTweener.js 
new/gjs-1.45.3/installed-tests/js/testTweener.js
--- old/gjs-1.44.0/installed-tests/js/testTweener.js    2015-06-12 
01:26:38.000000000 +0200
+++ new/gjs-1.45.3/installed-tests/js/testTweener.js    2015-10-28 
00:22:55.000000000 +0100
@@ -409,6 +409,80 @@
     }
 }
 
+function testTweenerOverwriteBeforeStart() {
+    var object = {
+        a: 0,
+        b: 0,
+        c: 0,
+        d: 0
+    };
+
+    var startCount = 0;
+    var overwriteCount = 0;
+    var completeCount = 0;
+
+    var tweenA = { a: 10, b: 10, c: 10, d: 10, time: 0.1,
+                   onStart: function() { startCount += 1; },
+                   onOverwrite: function() { overwriteCount += 1; },
+                   onComplete: function() { completeCount += 1; }
+                 };
+    var tweenB = { a: 20, b: 20, c: 20, d: 20, time: 0.1,
+                   onStart: function() { startCount += 1; },
+                   onOverwrite: function() { overwriteCount += 1; },
+                   onComplete: function() {
+                       completeCount += 1;
+                       Mainloop.quit('testTweenerOverwriteBeforeStart');
+                   }
+                 };
+
+    Tweener.addTween(object, tweenA);
+    Tweener.addTween(object, tweenB);
+
+    Mainloop.run('testTweenerOverwriteBeforeStart');
+
+    JSUnit.assertEquals(1, completeCount);
+    JSUnit.assertEquals(1, startCount);
+    JSUnit.assertEquals(1, overwriteCount);
+}
+
+function testTweenerOverwriteAfterStart() {
+    var object = {
+        a: 0,
+        b: 0,
+        c: 0,
+        d: 0
+    };
+
+    var startCount = 0;
+    var overwriteCount = 0;
+    var completeCount = 0;
+
+    var tweenA = { a: 10, b: 10, c: 10, d: 10, time: 0.1,
+                   onStart: function() {
+                     startCount += 1;
+                     Tweener.addTween(object, tweenB);
+                   },
+                   onOverwrite: function() { overwriteCount += 1; },
+                   onComplete: function() { completeCount += 1; }
+                 };
+    var tweenB = { a: 20, b: 20, c: 20, d: 20, time: 0.1,
+                   onStart: function() { startCount += 1; },
+                   onOverwrite: function() { overwriteCount += 1; },
+                   onComplete: function() {
+                       completeCount += 1;
+                       Mainloop.quit('testTweenerOverwriteAfterStart');
+                   }
+                 };
+
+    Tweener.addTween(object, tweenA);
+
+    Mainloop.run('testTweenerOverwriteAfterStart');
+
+    JSUnit.assertEquals(1, completeCount);
+    JSUnit.assertEquals(2, startCount);
+    JSUnit.assertEquals(1, overwriteCount);
+}
+
 installFrameTicker();
 JSUnit.gjstestRun(this, JSUnit.setUp, JSUnit.tearDown);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/jsunit-resources.c 
new/gjs-1.45.3/jsunit-resources.c
--- old/gjs-1.44.0/jsunit-resources.c   2015-06-24 00:32:57.000000000 +0200
+++ new/gjs-1.45.3/jsunit-resources.c   2015-12-18 17:15:56.000000000 +0100
@@ -181,17 +181,43 @@
 
 #define G_HAS_CONSTRUCTORS 1
 
-#define G_DEFINE_CONSTRUCTOR(_func) \
+/* We do some weird things to avoid the constructors being optimized
+ * away on VS2015 if WholeProgramOptimization is enabled. First we
+ * make a reference to the array from the wrapper to make sure its
+ * references. Then we use a pragma to make sure the wrapper function
+ * symbol is always included at the link stage. Also, the symbols
+ * need to be extern (but not dllexport), even though they are not
+ * really used from another object file.
+ */
+
+/* We need to account for differences between the mangling of symbols
+ * for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed
+ * with an underscore but symbols on x64 are not.
+ */
+#ifdef _WIN64
+#define G_MSVC_SYMBOL_PREFIX ""
+#else
+#define G_MSVC_SYMBOL_PREFIX "_"
+#endif
+
+#define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)
+#define G_DEFINE_DESTRUCTOR(_func) G_MSVC_DTOR (_func, G_MSVC_SYMBOL_PREFIX)
+
+#define G_MSVC_CTOR(_func,_sym_prefix) \
   static void _func(void); \
-  static int _func ## _wrapper(void) { _func(); return 0; } \
+  extern int (* _array ## _func)(void);              \
+  int _func ## _wrapper(void) { _func(); g_slist_find (NULL,  _array ## 
_func); return 0; } \
+  __pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \
   __pragma(section(".CRT$XCU",read)) \
-  __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = 
_func ## _wrapper;
+  __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## 
_wrapper;
 
-#define G_DEFINE_DESTRUCTOR(_func) \
+#define G_MSVC_DTOR(_func,_sym_prefix) \
   static void _func(void); \
-  static int _func ## _constructor(void) { atexit (_func); return 0; } \
+  extern int (* _array ## _func)(void);              \
+  int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL,  
_array ## _func); return 0; } \
+   __pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \
   __pragma(section(".CRT$XCU",read)) \
-  __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = 
_func ## _constructor;
+  __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## 
_constructor;
 
 #elif defined (_MSC_VER)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/mock-js-resources.c 
new/gjs-1.45.3/mock-js-resources.c
--- old/gjs-1.44.0/mock-js-resources.c  2015-10-27 23:09:39.000000000 +0100
+++ new/gjs-1.45.3/mock-js-resources.c  2015-12-18 17:25:58.000000000 +0100
@@ -142,17 +142,43 @@
 
 #define G_HAS_CONSTRUCTORS 1
 
-#define G_DEFINE_CONSTRUCTOR(_func) \
+/* We do some weird things to avoid the constructors being optimized
+ * away on VS2015 if WholeProgramOptimization is enabled. First we
+ * make a reference to the array from the wrapper to make sure its
+ * references. Then we use a pragma to make sure the wrapper function
+ * symbol is always included at the link stage. Also, the symbols
+ * need to be extern (but not dllexport), even though they are not
+ * really used from another object file.
+ */
+
+/* We need to account for differences between the mangling of symbols
+ * for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed
+ * with an underscore but symbols on x64 are not.
+ */
+#ifdef _WIN64
+#define G_MSVC_SYMBOL_PREFIX ""
+#else
+#define G_MSVC_SYMBOL_PREFIX "_"
+#endif
+
+#define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)
+#define G_DEFINE_DESTRUCTOR(_func) G_MSVC_DTOR (_func, G_MSVC_SYMBOL_PREFIX)
+
+#define G_MSVC_CTOR(_func,_sym_prefix) \
   static void _func(void); \
-  static int _func ## _wrapper(void) { _func(); return 0; } \
+  extern int (* _array ## _func)(void);              \
+  int _func ## _wrapper(void) { _func(); g_slist_find (NULL,  _array ## 
_func); return 0; } \
+  __pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \
   __pragma(section(".CRT$XCU",read)) \
-  __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = 
_func ## _wrapper;
+  __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## 
_wrapper;
 
-#define G_DEFINE_DESTRUCTOR(_func) \
+#define G_MSVC_DTOR(_func,_sym_prefix) \
   static void _func(void); \
-  static int _func ## _constructor(void) { atexit (_func); return 0; } \
+  extern int (* _array ## _func)(void);              \
+  int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL,  
_array ## _func); return 0; } \
+   __pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \
   __pragma(section(".CRT$XCU",read)) \
-  __declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = 
_func ## _constructor;
+  __declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## 
_constructor;
 
 #elif defined (_MSC_VER)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/modules/cairo-context.cpp 
new/gjs-1.45.3/modules/cairo-context.cpp
--- old/gjs-1.44.0/modules/cairo-context.cpp    2015-10-27 23:08:41.000000000 
+0100
+++ new/gjs-1.45.3/modules/cairo-context.cpp    2015-10-28 00:28:39.000000000 
+0100
@@ -1038,7 +1038,7 @@
     if (!cr)
         return JS_FALSE;
     if (transfer == GI_TRANSFER_EVERYTHING)
-        cairo_destroy(cr);
+        cairo_reference(cr);
 
     arg->v_pointer = cr;
     return JS_TRUE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/modules/format.js 
new/gjs-1.45.3/modules/format.js
--- old/gjs-1.44.0/modules/format.js    2015-06-12 01:26:38.000000000 +0200
+++ new/gjs-1.45.3/modules/format.js    2015-10-28 01:28:51.000000000 +0100
@@ -64,6 +64,11 @@
     });
 }
 
+function printf() {
+    let args = Array.prototype.slice.call(arguments);
+    let fmt = args.shift();
+    print(vprintf(fmt, args));
+}
 
 /*
  * This function is intended to extend the String object and provide
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/modules/lang.js 
new/gjs-1.45.3/modules/lang.js
--- old/gjs-1.44.0/modules/lang.js      2015-10-27 23:08:41.000000000 +0100
+++ new/gjs-1.45.3/modules/lang.js      2015-11-14 20:02:35.000000000 +0100
@@ -98,7 +98,7 @@
 
 // Class magic
 // Adapted from MooTools, MIT license
-// https://github.com/mootools/moootools-core
+// https://github.com/mootools/mootools-core
 
 function _Base() {
     throw new TypeError('Cannot instantiate abstract class _Base');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/modules/overrides/GObject.js 
new/gjs-1.45.3/modules/overrides/GObject.js
--- old/gjs-1.44.0/modules/overrides/GObject.js 2015-10-27 23:08:41.000000000 
+0100
+++ new/gjs-1.45.3/modules/overrides/GObject.js 2015-10-27 23:54:33.000000000 
+0100
@@ -96,7 +96,7 @@
                             let argArray = 
Array.prototype.slice.call(arguments);
                             let emitter = argArray.shift();
 
-                            wrapped.apply(emitter, argArray);
+                            return wrapped.apply(emitter, argArray);
                         });
                     }
                 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/modules/overrides/Gtk.js 
new/gjs-1.45.3/modules/overrides/Gtk.js
--- old/gjs-1.44.0/modules/overrides/Gtk.js     2015-06-12 01:26:38.000000000 
+0200
+++ new/gjs-1.45.3/modules/overrides/Gtk.js     2015-12-02 11:50:29.000000000 
+0100
@@ -40,6 +40,9 @@
         let internalChildren = params.InternalChildren;
         delete params.InternalChildren;
 
+        let cssName = params.CssName;
+        delete params.CssName;
+
         if (template) {
             params._instance_init = function() {
                 this.init_template();
@@ -48,6 +51,9 @@
 
         this.parent(params);
 
+        if (cssName)
+            Gtk.Widget.set_css_name.call(this, cssName);
+
         if (template) {
             if (typeof template == 'string' &&
                 template.startsWith('resource:///'))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.44.0/modules/tweener/tweener.js 
new/gjs-1.45.3/modules/tweener/tweener.js
--- old/gjs-1.44.0/modules/tweener/tweener.js   2015-06-12 01:26:38.000000000 
+0200
+++ new/gjs-1.45.3/modules/tweener/tweener.js   2015-10-28 00:22:26.000000000 
+0100
@@ -626,8 +626,10 @@
 
             for (name in _tweenList[i].properties) {
                 if (properties[name]) {
-                    _callOnFunction(_tweenList[i].onOverwrite, "onOverwrite", 
_tweenList[i].onOverwriteScope,
-                                    _tweenList[i].scope, 
_tweenList[i].onOverwriteParams);
+                    if (!removedLocally) {
+                        _callOnFunction(_tweenList[i].onOverwrite, 
"onOverwrite", _tweenList[i].onOverwriteScope,
+                                        _tweenList[i].scope, 
_tweenList[i].onOverwriteParams);
+                    }
 
                     _tweenList[i].properties[name] = undefined;
                     delete _tweenList[i].properties[name];


Reply via email to