Hello community,

here is the log from the commit of package gjs for openSUSE:Leap:15.2 checked 
in at 2020-03-06 12:38:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/gjs (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.gjs.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gjs"

Fri Mar  6 12:38:29 2020 rev:39 rq:779728 version:1.58.5

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/gjs/gjs.changes        2020-01-30 
14:50:21.294901011 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.gjs.new.26092/gjs.changes     2020-03-06 
12:40:01.190711340 +0100
@@ -1,0 +2,26 @@
+Tue Feb 18 09:48:14 UTC 2020 - Bjørn Lie <[email protected]>
+
+- Update to version 1.58.5:
+  + Can not access GObject properties of classes without
+    GI information.
+
+-------------------------------------------------------------------
+Wed Jan  8 08:33:52 UTC 2020 - Bjørn Lie <[email protected]>
+
+- Update to version 1.58.4:
+  + Now prints a warning when constructing an unregistered object
+    inheriting from GObject (i.e. if you forgot to use
+    GObject.registerClass.) In 1.58.2 this would throw an
+    exception, which broke some existing code, so that change was
+    reverted in 1.58.3. In this version the check is reinstated,
+    but we log a warning instead of throwing an exception, so that
+    people know to fix their code, but without breaking things.
+    NOTE: In 1.64 (the next stable release) the warning will be
+    changed back into an exception, because code with this problem
+    can be subtly broken and cause unexpected errors elsewhere. So
+    make sure to fix your code if you get this warning.
+  + GSettings crash fixes.
+  + Memory savings for Cairo objects.
+  + Fix for crash in debug functions.
+
+-------------------------------------------------------------------

Old:
----
  gjs-1.58.3.tar.xz

New:
----
  gjs-1.58.5.tar.xz

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

Other differences:
------------------
++++++ gjs.spec ++++++
--- /var/tmp/diff_new_pack.Nc2UwJ/_old  2020-03-06 12:40:02.734712279 +0100
+++ /var/tmp/diff_new_pack.Nc2UwJ/_new  2020-03-06 12:40:02.738712281 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package gjs
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           gjs
-Version:        1.58.3
+Version:        1.58.5
 Release:        0
 Summary:        JavaScript bindings based on gobject-introspection and Mozilla
 License:        MIT AND LGPL-2.0-or-later

++++++ gjs-1.58.3.tar.xz -> gjs-1.58.5.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/NEWS new/gjs-1.58.5/NEWS
--- old/gjs-1.58.3/NEWS 2019-11-25 18:59:08.000000000 +0100
+++ new/gjs-1.58.5/NEWS 2020-02-18 07:01:08.000000000 +0100
@@ -1,3 +1,32 @@
+Version 1.58.5
+--------------
+
+- Closed bugs and merge requests:
+  * Fix Visual Studio builds of gnome-3-34 (1.58.x) branch [Chun-wei Fan, !392]
+  * Can not access GObject properties of classes without GI information [Juan
+    Pablo Ugarte, !385, #299]
+
+Version 1.58.4
+--------------
+
+- Now prints a warning when constructing an unregistered object inheriting from
+  GObject (i.e. if you forgot to use GObject.registerClass.) In 1.58.2 this
+  would throw an exception, which broke some existing code, so that change was
+  reverted in 1.58.3. In this version the check is reinstated, but we log a
+  warning instead of throwing an exception, so that people know to fix their
+  code, but without breaking things.
+  NOTE: In 1.64 (the next stable release) the warning will be changed back into
+  an exception, because code with this problem can be subtly broken and cause
+  unexpected errors elsewhere. So make sure to fix your code if you get this
+  warning.
+
+- Closed bugs and merge requests:
+  * GSettings crash fixes [Andy Holmes, !373]
+
+- Memory savings for Cairo objects [Philip Chimento, !374]
+
+- Fix for crash in debug functions [Philip Chimento, !374]
+
 Version 1.58.3
 --------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/config.h.in new/gjs-1.58.5/config.h.in
--- old/gjs-1.58.3/config.h.in  2019-11-25 18:19:17.000000000 +0100
+++ new/gjs-1.58.5/config.h.in  2020-02-18 07:02:39.000000000 +0100
@@ -45,6 +45,9 @@
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
+/* Define to 1 if you have the <sys/signal.h> header file. */
+#undef HAVE_SYS_SIGNAL_H
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/configure new/gjs-1.58.5/configure
--- old/gjs-1.58.3/configure    2019-11-25 18:19:16.000000000 +0100
+++ new/gjs-1.58.5/configure    2020-02-18 07:02:32.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.58.3.
+# Generated by GNU Autoconf 2.69 for gjs 1.58.5.
 #
 # Report bugs to <https://gitlab.gnome.org/GNOME/gjs/issues>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='gjs'
 PACKAGE_TARNAME='gjs'
-PACKAGE_VERSION='1.58.3'
-PACKAGE_STRING='gjs 1.58.3'
+PACKAGE_VERSION='1.58.5'
+PACKAGE_STRING='gjs 1.58.5'
 PACKAGE_BUGREPORT='https://gitlab.gnome.org/GNOME/gjs/issues'
 PACKAGE_URL='https://wiki.gnome.org/Projects/Gjs'
 
@@ -1450,7 +1450,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.58.3 to adapt to many kinds of systems.
+\`configure' configures gjs 1.58.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1520,7 +1520,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of gjs 1.58.3:";;
+     short | recursive ) echo "Configuration of gjs 1.58.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1701,7 +1701,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-gjs configure 1.58.3
+gjs configure 1.58.5
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2252,7 +2252,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.58.3, which was
+It was created by gjs $as_me 1.58.5, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3115,7 +3115,7 @@
 
 # Define the identity of the package.
  PACKAGE='gjs'
- VERSION='1.58.3'
+ VERSION='1.58.5'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3342,10 +3342,10 @@
 
 
 
-GJS_VERSION=15803
+GJS_VERSION=15805
 
 
-$as_echo "#define GJS_VERSION (1 * 100 + 58) * 100 + 3" >>confdefs.h
+$as_echo "#define GJS_VERSION (1 * 100 + 58) * 100 + 5" >>confdefs.h
 
 
 
@@ -6985,7 +6985,7 @@
   fi
 
 
-for ac_header in sys/syscall.h unistd.h
+for ac_header in sys/signal.h sys/syscall.h unistd.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" 
"$ac_includes_default"
@@ -23788,7 +23788,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.58.3, which was
+This file was extended by gjs $as_me 1.58.5, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -23859,7 +23859,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.58.3
+gjs config.status 1.58.5
 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.58.3/configure.ac new/gjs-1.58.5/configure.ac
--- old/gjs-1.58.3/configure.ac 2019-11-25 18:14:10.000000000 +0100
+++ new/gjs-1.58.5/configure.ac 2020-02-18 06:59:38.000000000 +0100
@@ -3,7 +3,7 @@
 
 m4_define(pkg_major_version, 1)
 m4_define(pkg_minor_version, 58)
-m4_define(pkg_micro_version, 3)
+m4_define(pkg_micro_version, 5)
 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)
 
@@ -33,7 +33,7 @@
 AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_CXX
 AX_CXX_COMPILE_STDCXX_14
-AC_CHECK_HEADERS([sys/syscall.h unistd.h])
+AC_CHECK_HEADERS([sys/signal.h sys/syscall.h unistd.h])
 
 LT_PREREQ([2.2.0])
 # no stupid static libraries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/gi/object.cpp new/gjs-1.58.5/gi/object.cpp
--- old/gjs-1.58.3/gi/object.cpp        2019-11-25 18:15:15.000000000 +0100
+++ new/gjs-1.58.5/gi/object.cpp        2020-02-18 06:59:49.000000000 +0100
@@ -650,7 +650,28 @@
         canonicalize_key(canonical_name);
     }
 
-    GType *interfaces = g_type_interfaces(m_gtype, &n_interfaces);
+    GjsAutoFree<GType> interfaces = g_type_interfaces(m_gtype, &n_interfaces);
+
+    /* Fallback to GType system for non custom GObjects with no GI information
+     */
+    if (canonical_name && G_TYPE_IS_CLASSED(m_gtype) &&
+        !g_type_get_qdata(m_gtype, ObjectInstance::custom_type_quark())) {
+        GjsAutoTypeClass<GObjectClass> oclass(m_gtype);
+
+        if (g_object_class_find_property(oclass, canonical_name))
+            return lazy_define_gobject_property(cx, obj, id, resolved, name);
+
+        for (i = 0; i < n_interfaces; i++) {
+            if (!G_TYPE_IS_CLASSED(interfaces[i]))
+                continue;
+
+            GjsAutoTypeClass<GObjectClass> iclass(interfaces[i]);
+
+            if (g_object_class_find_property(iclass, canonical_name))
+                return lazy_define_gobject_property(cx, obj, id, resolved, 
name);
+        }
+    }
+
     for (i = 0; i < n_interfaces; i++) {
         GjsAutoInterfaceInfo iface_info =
             g_irepository_find_by_gtype(nullptr, interfaces[i]);
@@ -661,13 +682,10 @@
             g_interface_info_find_method(iface_info, name);
         if (method_info) {
             if (g_function_info_get_flags (method_info) & 
GI_FUNCTION_IS_METHOD) {
-                if (!gjs_define_function(cx, obj, m_gtype, method_info)) {
-                    g_free(interfaces);
+                if (!gjs_define_function(cx, obj, m_gtype, method_info))
                     return false;
-                }
 
                 *resolved = true;
-                g_free(interfaces);
                 return true;
             }
         }
@@ -678,14 +696,11 @@
         /* If the name refers to a GObject property, lazily define the property
          * in JS as we do below in the real resolve hook. We ignore fields here
          * because I don't think interfaces can have fields */
-        if (is_ginterface_property_name(iface_info, canonical_name)) {
-            g_free(interfaces);
+        if (is_ginterface_property_name(iface_info, canonical_name))
             return lazy_define_gobject_property(cx, obj, id, resolved, name);
-        }
     }
 
     *resolved = false;
-    g_free(interfaces);
     return true;
 }
 
@@ -1528,6 +1543,22 @@
                                       const JS::CallArgs& argv) {
     JS::RootedValue initer(context);
     GjsContextPrivate* gjs = GjsContextPrivate::from_cx(context);
+    const auto& new_target = argv.newTarget();
+    bool has_gtype;
+
+    g_assert(new_target.isObject() && "new.target needs to be an object");
+    JS::RootedObject rooted_target(context, &new_target.toObject());
+    if (!JS_HasOwnPropertyById(context, rooted_target, gjs->atoms().gtype(),
+                               &has_gtype))
+        return false;
+
+    if (!has_gtype) {
+        JS_ReportWarningASCII(
+            context,
+            "Tried to construct an object without a GType; are you using "
+            "GObject.registerClass() when inheriting from a GObject type?");
+    }
+
     return gjs_object_require_property(context, object, "GObject instance",
                                        gjs->atoms().init(), &initer) &&
            gjs->call_function(object, initer, argv, argv.rval());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/gjs/console.cpp 
new/gjs-1.58.5/gjs/console.cpp
--- old/gjs-1.58.3/gjs/console.cpp      2019-11-25 18:14:10.000000000 +0100
+++ new/gjs-1.58.5/gjs/console.cpp      2020-02-18 06:59:38.000000000 +0100
@@ -29,6 +29,8 @@
 
 #ifdef HAVE_UNISTD_H
 #    include <unistd.h>  // for close
+#elif defined (_WIN32)
+#    include <io.h>
 #endif
 
 #include <gio/gio.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/gjs/context.cpp 
new/gjs-1.58.5/gjs/context.cpp
--- old/gjs-1.58.3/gjs/context.cpp      2019-11-25 18:14:10.000000000 +0100
+++ new/gjs-1.58.5/gjs/context.cpp      2020-02-18 06:59:38.000000000 +0100
@@ -31,6 +31,8 @@
 
 #ifdef HAVE_UNISTD_H
 #    include <unistd.h>  // for getpid
+#elif defined (_WIN32)
+#    include <process.h>
 #endif
 
 #include <new>
@@ -281,7 +283,7 @@
 #ifdef G_OS_WIN32
         extern HMODULE gjs_dll;
         char *basedir = g_win32_get_package_installation_directory_of_module 
(gjs_dll);
-        char *priv_typelib_dir = g_build_filename (basedir, "lib", 
"girepository-1.0", NULL);
+        char *priv_typelib_dir = g_build_filename (basedir, "lib", "gjs", 
"girepository-1.0", NULL);
         g_free (basedir);
 #else
         char *priv_typelib_dir = g_build_filename (PKGLIBDIR, 
"girepository-1.0", NULL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/gjs/context.h new/gjs-1.58.5/gjs/context.h
--- old/gjs-1.58.3/gjs/context.h        2019-11-25 18:14:10.000000000 +0100
+++ new/gjs-1.58.5/gjs/context.h        2020-02-18 06:59:38.000000000 +0100
@@ -29,7 +29,10 @@
 #endif
 
 #include <stdbool.h>    /* IWYU pragma: keep */
-#include <sys/signal.h> /* for siginfo_t */
+
+#ifndef _WIN32
+#    include <sys/signal.h> /* for siginfo_t */
+#endif
 
 #include <glib-object.h>
 #include <glib.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/gjs/debugger.cpp 
new/gjs-1.58.5/gjs/debugger.cpp
--- old/gjs-1.58.3/gjs/debugger.cpp     2019-11-25 18:14:10.000000000 +0100
+++ new/gjs-1.58.5/gjs/debugger.cpp     2020-02-18 06:59:38.000000000 +0100
@@ -34,7 +34,7 @@
 
 #ifdef HAVE_UNISTD_H
 #    include <unistd.h>  // for isatty, STDIN_FILENO
-#elif defined(XP_WIN)
+#elif defined(_WIN32)
 #    include <io.h>
 #    ifndef STDIN_FILENO
 #        define STDIN_FILENO 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/gjs/engine.cpp 
new/gjs-1.58.5/gjs/engine.cpp
--- old/gjs-1.58.3/gjs/engine.cpp       2019-11-25 18:14:10.000000000 +0100
+++ new/gjs-1.58.5/gjs/engine.cpp       2020-02-18 06:59:38.000000000 +0100
@@ -23,7 +23,7 @@
 
 #include <stdint.h>
 
-#ifdef G_OS_WIN32
+#ifdef _WIN32
 #    define WIN32_LEAN_AND_MEAN
 #    include <windows.h>
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/gjs/importer.cpp 
new/gjs-1.58.5/gjs/importer.cpp
--- old/gjs-1.58.3/gjs/importer.cpp     2019-11-25 18:14:10.000000000 +0100
+++ new/gjs-1.58.5/gjs/importer.cpp     2020-02-18 06:59:38.000000000 +0100
@@ -23,7 +23,7 @@
 
 #include <string.h>  // for size_t, strcmp, strlen
 
-#ifdef G_OS_WIN32
+#ifdef _WIN32
 #    define WIN32_LEAN_AND_MEAN
 #    include <windows.h>
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/gjs/jsapi-util-string.cpp 
new/gjs-1.58.5/gjs/jsapi-util-string.cpp
--- old/gjs-1.58.3/gjs/jsapi-util-string.cpp    2019-11-25 18:14:10.000000000 
+0100
+++ new/gjs-1.58.5/gjs/jsapi-util-string.cpp    2020-02-18 06:59:38.000000000 
+0100
@@ -410,6 +410,8 @@
 std::string
 gjs_debug_string(JSString *str)
 {
+    if (!str)
+        return "<null string>";
     if (!JS_StringIsFlat(str)) {
         std::ostringstream out("<non-flat string of length ");
         out << JS_GetStringLength(str) << '>';
@@ -421,6 +423,9 @@
 std::string
 gjs_debug_symbol(JS::Symbol * const sym)
 {
+    if (!sym)
+        return "<null symbol>";
+
     /* This is OK because JS::GetSymbolCode() and JS::GetSymbolDescription()
      * can't cause a garbage collection */
     JS::HandleSymbol handle = JS::HandleSymbol::fromMarkedLocation(&sym);
@@ -455,6 +460,9 @@
 std::string
 gjs_debug_object(JSObject * const obj)
 {
+    if (!obj)
+        return "<null object>";
+
     std::ostringstream out;
     const JSClass* clasp = JS_GetClass(obj);
     out << "<object " << clasp->name << " at " << obj <<  '>';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/gjs/jsapi-util.cpp 
new/gjs-1.58.5/gjs/jsapi-util.cpp
--- old/gjs-1.58.3/gjs/jsapi-util.cpp   2019-11-25 18:14:10.000000000 +0100
+++ new/gjs-1.58.5/gjs/jsapi-util.cpp   2020-02-18 06:59:38.000000000 +0100
@@ -25,7 +25,7 @@
 #include <stdio.h>   // for sscanf
 #include <string.h>  // for strlen
 
-#ifdef XP_WIN
+#ifdef _WIN32
 #    define WIN32_LEAN_AND_MEAN
 #    include <windows.h>
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/gjs/jsapi-util.h 
new/gjs-1.58.5/gjs/jsapi-util.h
--- old/gjs-1.58.3/gjs/jsapi-util.h     2019-11-25 18:14:10.000000000 +0100
+++ new/gjs-1.58.5/gjs/jsapi-util.h     2020-02-18 06:59:46.000000000 +0100
@@ -64,6 +64,9 @@
     }
 };
 
+template <typename T>
+using GjsAutoFree = GjsAutoPointer<T, void, g_free>;
+
 struct GjsAutoCharFuncs {
     static char* dup(char* str) { return g_strdup(str); }
     static void free(char* str) { g_free(str); }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/gjs/profiler.cpp 
new/gjs-1.58.5/gjs/profiler.cpp
--- old/gjs-1.58.3/gjs/profiler.cpp     2019-11-25 18:14:10.000000000 +0100
+++ new/gjs-1.58.5/gjs/profiler.cpp     2020-02-18 06:59:38.000000000 +0100
@@ -21,9 +21,11 @@
  * IN THE SOFTWARE.
  */
 
-#include <config.h>  // for ENABLE_PROFILER, HAVE_SYS_SYSCALL_H, HAVE_UNISTD_H
+#include <config.h>  // for ENABLE_PROFILER, HAVE_SYS_SYSCALL_H, 
HAVE_UNISTD_H, HAVE_SYS_SIGNAL_H
 
-#include <sys/signal.h>  // for siginfo_t, sigevent, ...
+#ifdef HAVE_SYS_SIGNAL_H
+#    include <sys/signal.h>  // for siginfo_t, sigevent, ...
+#endif
 
 #include <glib-object.h>
 #include <glib.h>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/installed-tests/js/testGio.js 
new/gjs-1.58.5/installed-tests/js/testGio.js
--- old/gjs-1.58.3/installed-tests/js/testGio.js        2019-10-29 
04:39:05.000000000 +0100
+++ new/gjs-1.58.5/installed-tests/js/testGio.js        2020-02-15 
21:41:25.000000000 +0100
@@ -38,6 +38,18 @@
             .toThrowError(/schema/);
     });
 
+    it("doesn't crash when forgetting to specify a schema path", function () {
+        expect(() => new Gio.Settings({schema: 'org.gnome.GjsTest.Sub'}))
+            .toThrowError(/schema/);
+    });
+
+    it("doesn't crash when specifying conflicting schema paths", function () {
+        expect(() => new Gio.Settings({
+            schema: 'org.gnome.GjsTest',
+            path: '/conflicting/path/',
+        })).toThrowError(/schema/);
+    });
+
     describe('with existing schema', function () {
         const KINDS = ['boolean', 'double', 'enum', 'flags', 'int', 'int64',
             'string', 'strv', 'uint', 'uint64', 'value'];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/modules/cairo-context.cpp 
new/gjs-1.58.5/modules/cairo-context.cpp
--- old/gjs-1.58.3/modules/cairo-context.cpp    2019-11-25 18:14:10.000000000 
+0100
+++ new/gjs-1.58.5/modules/cairo-context.cpp    2020-02-18 06:59:38.000000000 
+0100
@@ -234,9 +234,6 @@
 _GJS_CAIRO_CONTEXT_DEFINE_FUNC_END
 
 typedef struct {
-    void *dummy;
-    JSContext  *context;
-    JSObject   *object;
     cairo_t * cr;
 } GjsCairoContext;
 
@@ -260,8 +257,6 @@
     g_assert(!priv_from_js(context, obj));
     JS_SetPrivate(obj, priv);
 
-    priv->context = context;
-    priv->object = obj;
     priv->cr = cairo_reference(cr);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/modules/cairo-path.cpp 
new/gjs-1.58.5/modules/cairo-path.cpp
--- old/gjs-1.58.3/modules/cairo-path.cpp       2019-11-25 18:14:10.000000000 
+0100
+++ new/gjs-1.58.5/modules/cairo-path.cpp       2020-02-18 06:59:38.000000000 
+0100
@@ -31,8 +31,6 @@
 #include "modules/cairo-private.h"  // IWYU pragma: keep
 
 typedef struct {
-    JSContext       *context;
-    JSObject        *object;
     cairo_path_t    *path;
 } GjsCairoPath;
 
@@ -92,8 +90,6 @@
     g_assert(!priv_from_js(context, object));
     JS_SetPrivate(object, priv);
 
-    priv->context = context;
-    priv->object = object;
     priv->path = path;
 
     return object;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/modules/cairo-pattern.cpp 
new/gjs-1.58.5/modules/cairo-pattern.cpp
--- old/gjs-1.58.3/modules/cairo-pattern.cpp    2019-11-25 18:14:10.000000000 
+0100
+++ new/gjs-1.58.5/modules/cairo-pattern.cpp    2020-02-18 06:59:38.000000000 
+0100
@@ -32,9 +32,6 @@
 #include "modules/cairo-private.h"
 
 typedef struct {
-    void            *dummy;
-    JSContext       *context;
-    JSObject        *object;
     cairo_pattern_t *pattern;
 } GjsCairoPattern;
 
@@ -123,8 +120,6 @@
     g_assert(!priv_from_js(context, object));
     JS_SetPrivate(object, priv);
 
-    priv->context = context;
-    priv->object = object;
     priv->pattern = cairo_pattern_reference(pattern);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/modules/cairo-region.cpp 
new/gjs-1.58.5/modules/cairo-region.cpp
--- old/gjs-1.58.3/modules/cairo-region.cpp     2019-11-25 18:14:10.000000000 
+0100
+++ new/gjs-1.58.5/modules/cairo-region.cpp     2020-02-18 06:59:38.000000000 
+0100
@@ -38,8 +38,6 @@
 #include "modules/cairo-private.h"
 
 typedef struct {
-    JSContext *context;
-    JSObject *object;
     cairo_region_t *region;
 } GjsCairoRegion;
 
@@ -255,8 +253,6 @@
     g_assert(!priv_from_js(context, obj));
     JS_SetPrivate(obj, priv);
 
-    priv->context = context;
-    priv->object = obj;
     priv->region = cairo_region_reference(region);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/modules/cairo-surface.cpp 
new/gjs-1.58.5/modules/cairo-surface.cpp
--- old/gjs-1.58.3/modules/cairo-surface.cpp    2019-11-25 18:14:10.000000000 
+0100
+++ new/gjs-1.58.5/modules/cairo-surface.cpp    2020-02-18 06:59:38.000000000 
+0100
@@ -36,9 +36,6 @@
 #include "modules/cairo-private.h"
 
 typedef struct {
-    void            *dummy;
-    JSContext       *context;
-    JSObject        *object;
     cairo_surface_t *surface;
 } GjsCairoSurface;
 
@@ -162,8 +159,6 @@
     g_assert(!priv_from_js(context, object));
     JS_SetPrivate(object, priv);
 
-    priv->context = context;
-    priv->object = object;
     priv->surface = cairo_surface_reference(surface);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/modules/overrides/Gio.js 
new/gjs-1.58.5/modules/overrides/Gio.js
--- old/gjs-1.58.3/modules/overrides/Gio.js     2019-10-29 04:39:05.000000000 
+0100
+++ new/gjs-1.58.5/modules/overrides/Gio.js     2020-02-18 06:59:38.000000000 
+0100
@@ -534,20 +534,33 @@
         _realInit: Gio.Settings.prototype._init,  // add manually, not 
enumerable
         _init(props = {}) {
             // 'schema' is a deprecated alias for schema_id
-            const requiredProps = ['schema', 'schema-id', 'schema_id', 
'schemaId',
-                'settings-schema', 'settings_schema', 'settingsSchema'];
-            if (requiredProps.every(prop => !(prop in props))) {
+            const schemaIdProp = ['schema', 'schema-id', 'schema_id',
+                'schemaId'].find(prop => prop in props);
+            const settingsSchemaProp = ['settings-schema', 'settings_schema',
+                'settingsSchema'].find(prop => prop in props);
+            if (!schemaIdProp && !settingsSchemaProp) {
                 throw new Error('One of property \'schema-id\' or ' +
                     '\'settings-schema\' are required for Gio.Settings');
             }
 
-            const checkSchemasProps = ['schema', 'schema-id', 'schema_id', 
'schemaId'];
             const source = Gio.SettingsSchemaSource.get_default();
-            for (const prop of checkSchemasProps) {
-                if (!(prop in props))
-                    continue;
-                if (source.lookup(props[prop], true) === null)
-                    throw new Error(`GSettings schema ${props[prop]} not 
found`);
+            const settingsSchema = settingsSchemaProp
+                ? props[settingsSchemaProp]
+                : source.lookup(props[schemaIdProp], true);
+
+            if (!settingsSchema)
+                throw new Error(`GSettings schema ${props[schemaIdProp]} not 
found`);
+
+            const settingsSchemaPath = settingsSchema.get_path();
+            if (props['path'] === undefined && !settingsSchemaPath) {
+                throw new Error('Attempting to create schema ' +
+                    `'${settingsSchema.get_id()}' without a path`);
+            }
+
+            if (props['path'] !== undefined && settingsSchemaPath &&
+                props['path'] !== settingsSchemaPath) {
+                throw new Error(`GSettings created for path 
'${props['path']}'` +
+                    `, but schema specifies '${settingsSchemaPath}'`);
             }
 
             return this._realInit(props);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/util/log.cpp new/gjs-1.58.5/util/log.cpp
--- old/gjs-1.58.3/util/log.cpp 2019-11-25 18:14:10.000000000 +0100
+++ new/gjs-1.58.5/util/log.cpp 2020-02-18 06:54:29.000000000 +0100
@@ -26,7 +26,7 @@
 #include <stdio.h>   // for FILE, fprintf, fflush, fopen, fputs, fseek
 #include <string.h>  // for strchr, strcmp
 
-#ifdef G_OS_WIN32
+#ifdef _WIN32
 # include <io.h>
 # include <process.h>
 # ifndef F_OK
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/win32/config-msvc.mak 
new/gjs-1.58.5/win32/config-msvc.mak
--- old/gjs-1.58.3/win32/config-msvc.mak        2019-11-25 18:14:10.000000000 
+0100
+++ new/gjs-1.58.5/win32/config-msvc.mak        2020-02-18 06:59:38.000000000 
+0100
@@ -46,6 +46,7 @@
        /Ivs$(VSVER)\$(CFG)\$(PLAT)\libgjs      \
        /FImsvc_recommended_pragmas.h   \
        /FIjs\RequiredDefines.h         \
+       /DNOMINMAX                      \
        /Dssize_t=gssize                \
        /wd4530                         \
        /wd4099                         \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/win32/config.h.win32 
new/gjs-1.58.5/win32/config.h.win32
--- old/gjs-1.58.3/win32/config.h.win32 2019-11-25 18:22:13.000000000 +0100
+++ new/gjs-1.58.5/win32/config.h.win32 2020-02-18 07:02:38.000000000 +0100
@@ -10,7 +10,7 @@
 /* #undef ENABLE_GTK */
 
 /* The gjs version as an integer */
-#define GJS_VERSION 15803
+#define GJS_VERSION 15805
 
 /* define if the compiler supports basic C++11 syntax */
 #define HAVE_CXX11 1
@@ -47,6 +47,9 @@
 /* Define to 1 if you have the <string.h> header file. */
 #define HAVE_STRING_H 1
 
+/* Define to 1 if you have the <sys/signal.h> header file. */
+/* #undef HAVE_SYS_SIGNAL_H */
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #define HAVE_SYS_STAT_H 1
 
@@ -71,7 +74,7 @@
 #define PACKAGE_NAME "gjs"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "gjs 1.58.3"
+#define PACKAGE_STRING "gjs 1.58.5"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "gjs"
@@ -80,10 +83,10 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "1.58.3"
+#define PACKAGE_VERSION "1.58.5"
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION "1.58.3"
+#define VERSION "1.58.5"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/win32/config.h.win32.in 
new/gjs-1.58.5/win32/config.h.win32.in
--- old/gjs-1.58.3/win32/config.h.win32.in      2019-11-25 18:14:10.000000000 
+0100
+++ new/gjs-1.58.5/win32/config.h.win32.in      2020-02-18 06:59:38.000000000 
+0100
@@ -47,6 +47,9 @@
 /* Define to 1 if you have the <string.h> header file. */
 #define HAVE_STRING_H 1
 
+/* Define to 1 if you have the <sys/signal.h> header file. */
+/* #undef HAVE_SYS_SIGNAL_H */
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #define HAVE_SYS_STAT_H 1
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.58.3/win32/install.mak 
new/gjs-1.58.5/win32/install.mak
--- old/gjs-1.58.3/win32/install.mak    2019-11-25 18:14:10.000000000 +0100
+++ new/gjs-1.58.5/win32/install.mak    2020-02-18 06:59:38.000000000 +0100
@@ -14,5 +14,5 @@
        @copy /b vs$(VSVER)\$(CFG)\$(PLAT)\gjs-console.pdb $(PREFIX)\bin
        @for %h in ($(LIBGJS_HEADERS)) do @copy ..\%h 
$(PREFIX)\include\gjs-1.0\%h
        @rem Copy the generated introspection files, if built
-       @if exist vs$(VSVER)\$(CFG)\$(PLAT)\GjsPrivate-1.0.gir copy 
vs$(VSVER)\$(CFG)\$(PLAT)\GjsPrivate-1.0.gir $(PREFIX)\share\gir-1.0
-       @if exist vs$(VSVER)\$(CFG)\$(PLAT)\GjsPrivate-1.0.typelib copy /b 
vs$(VSVER)\$(CFG)\$(PLAT)\GjsPrivate-1.0.typelib $(PREFIX)\lib\girepository-1.0
+       @if exist vs$(VSVER)\$(CFG)\$(PLAT)\GjsPrivate-1.0.typelib mkdir 
$(PREFIX)\lib\gjs\girepository-1.0
+       @if exist vs$(VSVER)\$(CFG)\$(PLAT)\GjsPrivate-1.0.typelib copy /b 
vs$(VSVER)\$(CFG)\$(PLAT)\GjsPrivate-1.0.typelib 
$(PREFIX)\lib\gjs\girepository-1.0


Reply via email to