Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gjs for openSUSE:Factory checked in 
at 2023-02-23 16:27:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gjs (Old)
 and      /work/SRC/openSUSE:Factory/.gjs.new.1706 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gjs"

Thu Feb 23 16:27:59 2023 rev:107 rq:1067039 version:1.74.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/gjs/gjs.changes  2022-11-01 13:40:55.075369323 
+0100
+++ /work/SRC/openSUSE:Factory/.gjs.new.1706/gjs.changes        2023-02-23 
16:29:00.716591898 +0100
@@ -1,0 +2,12 @@
+Tue Feb 21 10:24:51 UTC 2023 - Bjørn Lie <bjorn....@gmail.com>
+
+- Update to version 1.74.2:
+  + Various fixes ported from the development branch.
+  + Closed bugs and merge requests:
+    - Build error with clang
+    - Can't compile current version with mozjs 102
+    - Enabling window-list extension causes gnome-shell to crash
+      when running "dconf update" as root
+    - log: Fix an off-by-one buffer overflow
+
+-------------------------------------------------------------------

Old:
----
  gjs-1.74.1.tar.xz

New:
----
  gjs-1.74.2.tar.xz

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

Other differences:
------------------
++++++ gjs.spec ++++++
--- /var/tmp/diff_new_pack.tDW9Dk/_old  2023-02-23 16:29:01.256595011 +0100
+++ /var/tmp/diff_new_pack.tDW9Dk/_new  2023-02-23 16:29:01.264595057 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package gjs
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 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.74.1
+Version:        1.74.2
 # FIXME # Disable tests for unstable 1.71.1 - Try tests again on next 
versionbump
 Release:        0
 Summary:        JavaScript bindings based on gobject-introspection and Mozilla

++++++ gjs-1.74.1.tar.xz -> gjs-1.74.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.74.1/NEWS new/gjs-1.74.2/NEWS
--- old/gjs-1.74.1/NEWS 2022-10-30 00:57:47.000000000 +0200
+++ new/gjs-1.74.2/NEWS 2023-02-21 08:17:47.000000000 +0100
@@ -1,3 +1,15 @@
+Version 1.74.2
+--------------
+
+- Various fixes ported from the development branch.
+
+- Closed bugs and merge requests:
+  * build error with clang [#514, !807, Philip Chimento]
+  * can't compile current version with mozjs 102 [#503, !808, Philip Chimento]
+  * Enabling window-list extension causes gnome-shell to crash when running
+    "dconf update" as root [#510, !813, Philip Chimento]
+  * log: Fix an off-by-one buffer overflow [!817, Valentin David]
+
 Version 1.74.1
 --------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.74.1/gi/function.h new/gjs-1.74.2/gi/function.h
--- old/gjs-1.74.1/gi/function.h        2022-10-30 00:57:47.000000000 +0200
+++ new/gjs-1.74.2/gi/function.h        2023-02-21 08:17:47.000000000 +0100
@@ -21,6 +21,7 @@
 #include <js/GCVector.h>
 #include <js/RootingAPI.h>
 #include <js/TypeDecls.h>
+#include <js/Value.h>
 
 #include "gi/closure.h"
 #include "gjs/jsapi-util.h"
@@ -100,7 +101,7 @@
  public:
     std::unordered_set<GIArgument*> ignore_release;
     JS::RootedObject instance_object;
-    JS::RootedValueVector return_values;
+    JS::RootedVector<JS::Value> return_values;
     GjsAutoError local_error;
     GICallableInfo* info;
     uint8_t gi_argc = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.74.1/gi/gobject.cpp 
new/gjs-1.74.2/gi/gobject.cpp
--- old/gjs-1.74.1/gi/gobject.cpp       2022-10-30 00:57:47.000000000 +0200
+++ new/gjs-1.74.2/gi/gobject.cpp       2023-02-21 08:17:47.000000000 +0100
@@ -203,6 +203,12 @@
                                      unsigned property_id [[maybe_unused]],
                                      const GValue* value, GParamSpec* pspec) {
     auto* priv = ObjectInstance::for_gobject(object);
+    if (!priv) {
+        g_warning("Wrapper for GObject %p was disposed, cannot set property 
%s",
+                  object, g_param_spec_get_name(pspec));
+        return;
+    }
+
     JSContext* cx = current_js_context();
 
     JS::RootedObject js_obj(cx, priv->wrapper());
@@ -216,6 +222,12 @@
                                      unsigned property_id [[maybe_unused]],
                                      GValue* value, GParamSpec* pspec) {
     auto* priv = ObjectInstance::for_gobject(object);
+    if (!priv) {
+        g_warning("Wrapper for GObject %p was disposed, cannot get property 
%s",
+                  object, g_param_spec_get_name(pspec));
+        return;
+    }
+
     JSContext* cx = current_js_context();
 
     JS::RootedObject js_obj(cx, priv->wrapper());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.74.1/installed-tests/js/testIntrospection.js 
new/gjs-1.74.2/installed-tests/js/testIntrospection.js
--- old/gjs-1.74.1/installed-tests/js/testIntrospection.js      2022-10-30 
00:57:47.000000000 +0200
+++ new/gjs-1.74.2/installed-tests/js/testIntrospection.js      2023-02-21 
08:17:47.000000000 +0100
@@ -140,6 +140,41 @@
         System.gc();
         GLib.idle_add(GLib.PRIORITY_LOW, () => done());
     });
+
+    // This tests a race condition that would crash; it should warn instead
+    it('handles setting a property from C on an object whose JS wrapper has 
been collected', function (done) {
+        class SomeObject extends GObject.Object {
+            static [GObject.properties] = {
+                'screenfull': GObject.ParamSpec.boolean('screenfull', '', '',
+                    GObject.ParamFlags.READWRITE,
+                    false),
+            };
+
+            static {
+                GObject.registerClass(this);
+            }
+        }
+
+        GLib.test_expect_message('Gjs', GLib.LogLevelFlags.LEVEL_WARNING,
+            '*property screenfull*');
+
+        const settings = new Gio.Settings({schema: 'org.gnome.GjsTest'});
+        let obj = new SomeObject();
+        settings.bind('fullscreen', obj, 'screenfull', 
Gio.SettingsBindFlags.DEFAULT);
+        const handler = settings.connect('changed::fullscreen', () => {
+            obj.run_dispose();
+            obj = null;
+            settings.disconnect(handler);
+            GLib.idle_add(GLib.PRIORITY_LOW, () => {
+                GLib.test_assert_expected_messages_internal('Gjs',
+                    'testIntrospection.js', 0,
+                    'Warn about setting property on disposed JS object');
+                done();
+            });
+        });
+        settings.set_boolean('fullscreen', 
!settings.get_boolean('fullscreen'));
+        settings.reset('fullscreen');
+    });
 });
 
 describe('Gdk.Atom', function () {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.74.1/meson.build new/gjs-1.74.2/meson.build
--- old/gjs-1.74.1/meson.build  2022-10-30 00:57:47.000000000 +0200
+++ new/gjs-1.74.2/meson.build  2023-02-21 08:17:47.000000000 +0100
@@ -2,7 +2,7 @@
 # SPDX-FileCopyrightText: 2019 Philip Chimento <philip.chime...@gmail.com>
 # SPDX-FileCopyrightText: 2019 Chun-wei Fan <fanchun...@src.gnome.org>
 
-project('gjs', 'cpp', 'c', version: '1.74.1', license: ['MIT', 'LGPL2+'],
+project('gjs', 'cpp', 'c', version: '1.74.2', license: ['MIT', 'LGPL2+'],
     meson_version: '>= 0.54.0',
     default_options: ['cpp_std=c++17', 'cpp_rtti=false', 'c_std=c99',
         'warning_level=2', 'b_pch=true' ])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.74.1/test/gjs-tests.cpp 
new/gjs-1.74.2/test/gjs-tests.cpp
--- old/gjs-1.74.1/test/gjs-tests.cpp   2022-10-30 00:57:47.000000000 +0200
+++ new/gjs-1.74.2/test/gjs-tests.cpp   2023-02-21 08:17:47.000000000 +0100
@@ -56,11 +56,29 @@
 using Gjs::Test::assert_equal;
 
 template <typename T>
+struct is_char_helper : public std::false_type {};
+template <>
+struct is_char_helper<char> : public std::true_type {};
+template <>
+struct is_char_helper<wchar_t> : public std::true_type {};
+template <>
+struct is_char_helper<char16_t> : public std::true_type {};
+template <>
+struct is_char_helper<char32_t> : public std::true_type {};
+template <typename T>
+struct is_char : public is_char_helper<std::remove_cv_t<T>>::type {};
+template <typename T>
+inline constexpr bool is_char_v = is_char<T>::value;
+
+template <typename T>
 T get_random_number() {
     std::mt19937_64 gen(cpp_random_seed);
 
     if constexpr (std::is_same_v<T, bool>) {
         return g_random_boolean();
+    } else if constexpr (is_char_v<T>) {
+        return std::char_traits<T>::to_char_type(
+            get_random_number<typename std::char_traits<T>::int_type>());
     } else if constexpr (std::is_integral_v<T>) {
         T lowest_value = std::numeric_limits<T>::lowest();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-1.74.1/util/log.cpp new/gjs-1.74.2/util/log.cpp
--- old/gjs-1.74.1/util/log.cpp 2022-10-30 00:57:47.000000000 +0200
+++ new/gjs-1.74.2/util/log.cpp 2023-02-21 08:17:47.000000000 +0100
@@ -152,7 +152,8 @@
             GjsAutoStrv prefixes(g_strsplit(topics, ";", -1));
             for (unsigned i = 0; prefixes[i] != NULL; i++) {
                 GjsDebugTopic topic = prefix_to_topic(prefixes[i]);
-                s_enabled_topics[topic] = topic != GJS_DEBUG_LAST;
+                if (topic != GJS_DEBUG_LAST)
+                    s_enabled_topics[topic] = true;
             }
         }
     }

Reply via email to