Hello community,
here is the log from the commit of package gjs for openSUSE:Factory checked in at 2018-02-03 15:38:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gjs (Old)
and /work/SRC/openSUSE:Factory/.gjs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gjs"
Sat Feb 3 15:38:41 2018 rev:70 rq:572081 version:1.50.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/gjs/gjs.changes 2017-11-03 19:07:10.565741783 +0100
+++ /work/SRC/openSUSE:Factory/.gjs.new/gjs.changes 2018-02-03 15:38:42.671996133 +0100
@@ -1,0 +2,20 @@
+Tue Jan 30 21:25:23 UTC 2018 - bjorn.lie@gmail.com
+
+- Update to version 1.50.4:
+ + Gnome Shell crash with places-status extension when you plug an
+ USB device (glgo#gjs#33 and glgo#gjs#38).
+- Changes from version 1.50.3:
+ + GJS will now log a warning when a GObject is accessed in
+ Javascript code after the underlying object has been freed in
+ C. (This used to work most of the time, but crash
+ unpredictably.) We now prevent this situation which, is usually
+ by caused a memory management bug in the underlying C library.
+ + Closed bugs and merge requests:
+ - Add checks for GObjects that have been finalized
+ (glgo#gjs#21, glgo#gjs#23, glgo#gjs#25, glgo#gjs#28,
+ glgo#gjs#33).
+ - Test "Cairo context has methods when created from a C
+ function" fails (glgo#gjs#27, glgo#gjs#35).
+ - Various fixes from the master branch for rare crashes.
+
+-------------------------------------------------------------------
@@ -6,2 +26,2 @@
- * tweener: Fix a couple of warnings.
- * legacy: Allow ES6 classes to inherit from abstract Lang.Class
+ - tweener: Fix a couple of warnings.
+ - legacy: Allow ES6 classes to inherit from abstract Lang.Class
Old:
----
gjs-1.50.2.tar.xz
New:
----
gjs-1.50.4.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gjs.spec ++++++
--- /var/tmp/diff_new_pack.NFt5fx/_old 2018-02-03 15:38:43.363963812 +0100
+++ /var/tmp/diff_new_pack.NFt5fx/_new 2018-02-03 15:38:43.367963626 +0100
@@ -1,7 +1,7 @@
#
# spec file for package gjs
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.50.2
+Version: 1.50.4
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
++++++ gjs-1.50.2.tar.xz -> gjs-1.50.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/Makefile-test.am new/gjs-1.50.4/Makefile-test.am
--- old/gjs-1.50.2/Makefile-test.am 2017-10-31 16:57:13.000000000 +0100
+++ new/gjs-1.50.4/Makefile-test.am 2018-01-27 23:32:25.000000000 +0100
@@ -228,6 +228,7 @@
installed-tests/js/testGIMarshalling.js \
installed-tests/js/testGLib.js \
installed-tests/js/testGObjectClass.js \
+ installed-tests/js/testGObjectDestructionAccess.js \
installed-tests/js/testGObjectInterface.js \
installed-tests/js/testGTypeClass.js \
installed-tests/js/testGio.js \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/Makefile.in new/gjs-1.50.4/Makefile.in
--- old/gjs-1.50.2/Makefile.in 2017-10-31 17:02:13.000000000 +0100
+++ new/gjs-1.50.4/Makefile.in 2018-01-27 23:49:42.000000000 +0100
@@ -91,8 +91,8 @@
$(srcdir)/gjs-1.0.pc.in $(top_srcdir)/win32/config.h.win32.in \
depcomp $(dist_gjsjs_DATA) \
$(nobase_gjs_public_include_HEADERS) $(noinst_HEADERS) COPYING \
- compile config.guess config.sub install-sh missing ltmain.sh \
- tap-driver.sh
+ compile config.guess config.rpath config.sub install-sh \
+ missing ltmain.sh tap-driver.sh
@ENABLE_GTK_TRUE@am__append_1 = $(GJS_GTK_CFLAGS)
@ENABLE_GTK_TRUE@am__append_2 = $(GJS_GTK_LIBS)
@ENABLE_GTK_TRUE@am__append_3 = $(gjs_gtk_private_srcs)
@@ -620,6 +620,7 @@
installed-tests/js/testGIMarshalling.js \
installed-tests/js/testGLib.js \
installed-tests/js/testGObjectClass.js \
+ installed-tests/js/testGObjectDestructionAccess.js \
installed-tests/js/testGObjectInterface.js \
installed-tests/js/testGTypeClass.js \
installed-tests/js/testGio.js \
@@ -1300,6 +1301,7 @@
installed-tests/js/testGIMarshalling.js \
installed-tests/js/testGLib.js \
installed-tests/js/testGObjectClass.js \
+ installed-tests/js/testGObjectDestructionAccess.js \
installed-tests/js/testGObjectInterface.js \
installed-tests/js/testGTypeClass.js \
installed-tests/js/testGio.js \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/NEWS new/gjs-1.50.4/NEWS
--- old/gjs-1.50.2/NEWS 2017-10-31 17:00:41.000000000 +0100
+++ new/gjs-1.50.4/NEWS 2018-01-27 23:49:15.000000000 +0100
@@ -1,3 +1,27 @@
+Version 1.50.4
+--------------
+
+- Closed bugs and merge requests:
+
+ * Gnome Shell crash with places-status extension when you plug an USB device
+ [#33, !38, Philip Chimento]
+
+Version 1.50.3
+--------------
+
+- GJS will now log a warning when a GObject is accessed in Javascript code
+ after the underlying object has been freed in C. (This used to work most of
+ the time, but crash unpredictably.) We now prevent this situation which, is
+ usually caused by a memory management bug in the underlying C library.
+
+- Closed bugs and merge requests:
+
+ * Add checks for GObjects that have been finalized [#21, #23, !25, !28, !33,
+ Marco Trevisan]
+ * Test "Cairo context has methods when created from a C function" fails [#27,
+ !35, Valentín Barros]
+ * Various fixes from the master branch for rare crashes [Philip Chimento]
+
Version 1.50.2
--------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/configure new/gjs-1.50.4/configure
--- old/gjs-1.50.2/configure 2017-10-31 17:02:11.000000000 +0100
+++ new/gjs-1.50.4/configure 2018-01-27 23:49:40.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.50.2.
+# Generated by GNU Autoconf 2.69 for gjs 1.50.4.
#
# 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.50.2'
-PACKAGE_STRING='gjs 1.50.2'
+PACKAGE_VERSION='1.50.4'
+PACKAGE_STRING='gjs 1.50.4'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gjs'
PACKAGE_URL='https://wiki.gnome.org/Projects/Gjs'
@@ -1446,7 +1446,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.50.2 to adapt to many kinds of systems.
+\`configure' configures gjs 1.50.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1516,7 +1516,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of gjs 1.50.2:";;
+ short | recursive ) echo "Configuration of gjs 1.50.4:";;
esac
cat <<\_ACEOF
@@ -1690,7 +1690,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-gjs configure 1.50.2
+gjs configure 1.50.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2180,7 +2180,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.50.2, which was
+It was created by gjs $as_me 1.50.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3043,7 +3043,7 @@
# Define the identity of the package.
PACKAGE='gjs'
- VERSION='1.50.2'
+ VERSION='1.50.4'
cat >>confdefs.h <<_ACEOF
@@ -3269,10 +3269,10 @@
-GJS_VERSION=15002
+GJS_VERSION=15004
-$as_echo "#define GJS_VERSION (1 * 100 + 50) * 100 + 2" >>confdefs.h
+$as_echo "#define GJS_VERSION (1 * 100 + 50) * 100 + 4" >>confdefs.h
GETTEXT_PACKAGE=gjs
@@ -21206,7 +21206,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.50.2, which was
+This file was extended by gjs $as_me 1.50.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21277,7 +21277,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.50.2
+gjs config.status 1.50.4
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.50.2/configure.ac new/gjs-1.50.4/configure.ac
--- old/gjs-1.50.2/configure.ac 2017-10-31 16:55:51.000000000 +0100
+++ new/gjs-1.50.4/configure.ac 2018-01-27 23:49:15.000000000 +0100
@@ -3,7 +3,7 @@
m4_define(pkg_major_version, 1)
m4_define(pkg_minor_version, 50)
-m4_define(pkg_micro_version, 2)
+m4_define(pkg_micro_version, 4)
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)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/gi/object.cpp new/gjs-1.50.4/gi/object.cpp
--- old/gjs-1.50.2/gi/object.cpp 2017-10-31 16:55:51.000000000 +0100
+++ new/gjs-1.50.4/gi/object.cpp 2018-01-27 23:38:36.000000000 +0100
@@ -72,6 +72,7 @@
std::deque vfuncs;
unsigned js_object_finalized : 1;
+ unsigned g_object_finalized : 1;
};
static std::stackJS::PersistentRootedObject object_init_list;
@@ -408,6 +409,16 @@
if (priv->gobj == NULL) /* prototype, not an instance. */
return true;
+ if (priv->g_object_finalized) {
+ g_critical("Object %s.%s (%p), has been already finalized. "
+ "Impossible to get any property from it.",
+ priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "",
+ priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype),
+ priv->gobj);
+ gjs_dumpstack();
+ return true;
+ }
+
if (!get_prop_from_g_param(context, obj, priv, name, value_p))
return false;
@@ -518,6 +529,16 @@
if (priv->gobj == NULL) /* prototype, not an instance. */
return result.succeed();
+ if (priv->g_object_finalized) {
+ g_critical("Object %s.%s (%p), has been already finalized. "
+ "Impossible to set any property to it.",
+ priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "",
+ priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype),
+ priv->gobj);
+ gjs_dumpstack();
+ return result.succeed();
+ }
+
ret = set_g_param_from_prop(context, priv, name, g_param_was_set, value_p, result);
if (g_param_was_set || !ret)
return ret;
@@ -755,6 +776,18 @@
return true;
}
+ if (priv->g_object_finalized) {
+ g_critical("Object %s.%s (%p), has been already finalized. "
+ "Impossible to resolve it.",
+ priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "",
+ priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype),
+ priv->gobj);
+ gjs_dumpstack();
+
+ *resolved = false;
+ return true;
+ }
+
/* If we have no GIRepository information (we're a JS GObject subclass),
* we need to look at exposing interfaces. Look up our interfaces through
* GType data, and then hope that *those* are introspectable. */
@@ -938,7 +971,10 @@
wrapped_gobj_dispose_notify(gpointer data,
GObject *where_the_object_was)
{
- weak_pointer_list.erase(static_cast(data));
+ auto *priv = static_cast(data);
+
+ priv->g_object_finalized = true;
+ weak_pointer_list.erase(priv);
#if DEBUG_DISPOSE
gjs_debug(GJS_DEBUG_GOBJECT, "Wrapped GObject %p disposed", where_the_object_was);
#endif
@@ -1434,6 +1470,15 @@
if (priv == NULL)
return;
+ if (priv->g_object_finalized) {
+ g_debug("Object %s.%s (%p), has been already finalized. "
+ "Impossible to trace it.",
+ priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "",
+ priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype),
+ priv->gobj);
+ return;
+ }
+
for (GClosure *closure : priv->signals)
gjs_closure_trace(closure, tracer);
@@ -1634,6 +1679,16 @@
priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype));
return false;
}
+ if (priv->g_object_finalized) {
+ g_critical("Object %s.%s (%p), has been already deallocated - impossible to connect to signal. "
+ "This might be caused by the fact that the object has been destroyed from C "
+ "code using something such as destroy(), dispose(), or remove() vfuncs",
+ priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "",
+ priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype),
+ priv->gobj);
+ gjs_dumpstack();
+ return true;
+ }
if (argc != 2 || !argv[0].isString() || !JS::IsCallable(&argv[1].toObject())) {
gjs_throw(context, "connect() takes two args, the signal name and the callback");
@@ -1721,6 +1776,17 @@
return false;
}
+ if (priv->g_object_finalized) {
+ g_critical("Object %s.%s (%p), has been already deallocated - impossible to emit signal. "
+ "This might be caused by the fact that the object has been destroyed from C "
+ "code using something such as destroy(), dispose(), or remove() vfuncs",
+ priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "",
+ priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype),
+ priv->gobj);
+ gjs_dumpstack();
+ return true;
+ }
+
if (argc < 1 || !argv[0].isString()) {
gjs_throw(context, "emit() first arg is the signal name");
return false;
@@ -1809,7 +1875,9 @@
return false; /* wrong class passed in */
}
- return _gjs_proxy_to_string_func(context, obj, "object",
+ return _gjs_proxy_to_string_func(context, obj,
+ (priv->g_object_finalized) ?
+ "object (FINALIZED)" : "object",
(GIBaseInfo*)priv->info, priv->gtype,
priv->gobj, rec.rval());
}
@@ -2128,6 +2196,18 @@
return false;
}
+ if (priv->g_object_finalized) {
+ g_critical("Object %s.%s (%p), has been already deallocated - impossible to access to it. "
+ "This might be caused by the fact that the object has been destroyed from C "
+ "code using something such as destroy(), dispose(), or remove() vfuncs",
+ priv->info ? g_base_info_get_namespace( (GIBaseInfo*) priv->info) : "",
+ priv->info ? g_base_info_get_name( (GIBaseInfo*) priv->info) : g_type_name(priv->gtype),
+ priv->gobj);
+ gjs_dumpstack();
+
+ return true;
+ }
+
g_assert(priv->gtype == G_OBJECT_TYPE(priv->gobj));
if (expected_type != G_TYPE_NONE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/gi/param.cpp new/gjs-1.50.4/gi/param.cpp
--- old/gjs-1.50.2/gi/param.cpp 2017-10-31 16:55:51.000000000 +0100
+++ new/gjs-1.50.4/gi/param.cpp 2018-01-27 23:32:25.000000000 +0100
@@ -61,8 +61,10 @@
GjsAutoJSChar name(context);
bool ret = false;
- if (!gjs_get_string_id(context, id, &name))
+ if (!gjs_get_string_id(context, id, &name)) {
+ *resolved = false;
return true; /* not resolved, but no error */
+ }
priv = priv_from_js(context, obj);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/gjs/importer.cpp new/gjs-1.50.4/gjs/importer.cpp
--- old/gjs-1.50.2/gjs/importer.cpp 2017-10-31 16:55:51.000000000 +0100
+++ new/gjs-1.50.4/gjs/importer.cpp 2018-01-27 23:32:25.000000000 +0100
@@ -490,9 +490,10 @@
JS::RootedValue elem(context);
/* First try importing an internal module like byteArray */
- if (priv->is_root &&
- gjs_is_registered_native_module(context, obj, name) &&
- import_native_file(context, obj, name)) {
+ if (priv->is_root && gjs_is_registered_native_module(context, obj, name)) {
+ if (!import_native_file(context, obj, name))
+ goto out;
+
gjs_debug(GJS_DEBUG_IMPORTER,
"successfully imported module '%s'", name);
result = true;
@@ -761,8 +762,10 @@
return true;
}
- if (!gjs_get_string_id(context, id, &name))
- return false;
+ if (!gjs_get_string_id(context, id, &name)) {
+ *resolved = false;
+ return true;
+ }
/* let Object.prototype resolve these */
if (strcmp(name, "valueOf") == 0 ||
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/gjs/jsapi-util-string.cpp new/gjs-1.50.4/gjs/jsapi-util-string.cpp
--- old/gjs-1.50.2/gjs/jsapi-util-string.cpp 2017-10-02 20:18:48.000000000 +0200
+++ new/gjs-1.50.4/gjs/jsapi-util-string.cpp 2018-01-27 23:37:59.000000000 +0100
@@ -30,25 +30,20 @@
#include "jsapi-wrapper.h"
bool
-gjs_string_to_utf8 (JSContext *context,
- const JS::Value value,
- GjsAutoJSChar *utf8_string_p)
+gjs_string_to_utf8(JSContext *cx,
+ const JS::Value value,
+ GjsAutoJSChar *utf8_string_p)
{
- JS_BeginRequest(context);
+ JSAutoRequest ar(cx);
if (!value.isString()) {
- gjs_throw(context,
- "Value is not a string, cannot convert to UTF-8");
- JS_EndRequest(context);
+ gjs_throw(cx, "Value is not a string, cannot convert to UTF-8");
return false;
}
- JS::RootedString str(context, value.toString());
- utf8_string_p->reset(context, JS_EncodeStringToUTF8(context, str));
-
- JS_EndRequest(context);
-
- return true;
+ JS::RootedString str(cx, value.toString());
+ utf8_string_p->reset(cx, JS_EncodeStringToUTF8(cx, str));
+ return !!*utf8_string_p;
}
bool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/installed-tests/js/testCairo.js new/gjs-1.50.4/installed-tests/js/testCairo.js
--- old/gjs-1.50.2/installed-tests/js/testCairo.js 2017-09-08 05:55:00.000000000 +0200
+++ new/gjs-1.50.4/installed-tests/js/testCairo.js 2018-01-10 06:55:16.000000000 +0100
@@ -181,7 +181,7 @@
cr = Gdk.cairo_create(da.window);
expect(cr.save).toBeDefined();
- expect(_ts(cr.getTarget())).toEqual('Surface');
+ expect(cr.getTarget()).toBeDefined();
});
});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/installed-tests/js/testGObjectDestructionAccess.js new/gjs-1.50.4/installed-tests/js/testGObjectDestructionAccess.js
--- old/gjs-1.50.2/installed-tests/js/testGObjectDestructionAccess.js 1970-01-01 01:00:00.000000000 +0100
+++ new/gjs-1.50.4/installed-tests/js/testGObjectDestructionAccess.js 2018-01-27 23:32:25.000000000 +0100
@@ -0,0 +1,92 @@
+// -*- mode: js; indent-tabs-mode: nil -*-
+imports.gi.versions.Gtk = '3.0';
+
+const GLib = imports.gi.GLib;
+const Gtk = imports.gi.Gtk;
+
+describe('Access to destroyed GObject', () => {
+ let destroyedWindow;
+
+ beforeAll(() => {
+ Gtk.init(null);
+ });
+
+ beforeEach(() => {
+ destroyedWindow = new Gtk.Window({type: Gtk.WindowType.TOPLEVEL});
+ destroyedWindow.destroy();
+ });
+
+ it('Get property', () => {
+ GLib.test_expect_message('Gjs', GLib.LogLevelFlags.LEVEL_CRITICAL,
+ 'Object Gtk.Window (0x*');
+
+ let title = destroyedWindow.title;
+
+ GLib.test_assert_expected_messages_internal('Gjs', 'testGObjectDestructionAccess.js', 0,
+ 'testExceptionInDestroyedObjectPropertyGet');
+ });
+
+ it('Set property', () => {
+ GLib.test_expect_message('Gjs', GLib.LogLevelFlags.LEVEL_CRITICAL,
+ 'Object Gtk.Window (0x*');
+
+ destroyedWindow.title = 'I am dead';
+
+ GLib.test_assert_expected_messages_internal('Gjs', 'testGObjectDestructionAccess.js', 0,
+ 'testExceptionInDestroyedObjectPropertySet');
+ });
+
+ it('Access to getter method', () => {
+ GLib.test_expect_message('Gjs', GLib.LogLevelFlags.LEVEL_CRITICAL,
+ 'Object Gtk.Window (0x*');
+
+ let title = destroyedWindow.get_title();
+
+ GLib.test_assert_expected_messages_internal('Gjs', 'testGObjectDestructionAccess.js', 0,
+ 'testExceptionInDestroyedObjectMethodGet');
+ });
+
+ it('Access to setter method', () => {
+ GLib.test_expect_message('Gjs', GLib.LogLevelFlags.LEVEL_CRITICAL,
+ 'Object Gtk.Window (0x*');
+
+ destroyedWindow.set_title('I am dead');
+
+ GLib.test_assert_expected_messages_internal('Gjs', 'testGObjectDestructionAccess.js', 0,
+ 'testExceptionInDestroyedObjectMethodSet');
+ });
+
+ it('Proto function connect', () => {
+ GLib.test_expect_message('Gjs', GLib.LogLevelFlags.LEVEL_CRITICAL,
+ 'Object Gtk.Window (0x*');
+
+ destroyedWindow.connect('foo-signal', () => {});
+
+ GLib.test_assert_expected_messages_internal('Gjs', 'testGObjectDestructionAccess.js', 0,
+ 'testExceptionInDestroyedObjectConnect');
+ });
+
+ it('Proto function connect_after', () => {
+ GLib.test_expect_message('Gjs', GLib.LogLevelFlags.LEVEL_CRITICAL,
+ 'Object Gtk.Window (0x*');
+
+ destroyedWindow.connect_after('foo-signal', () => {});
+
+ GLib.test_assert_expected_messages_internal('Gjs', 'testGObjectDestructionAccess.js', 0,
+ 'testExceptionInDestroyedObjectConnectAfter');
+ });
+
+ it('Proto function emit', () => {
+ GLib.test_expect_message('Gjs', GLib.LogLevelFlags.LEVEL_CRITICAL,
+ 'Object Gtk.Window (0x*');
+
+ destroyedWindow.emit('foo-signal');
+
+ GLib.test_assert_expected_messages_internal('Gjs', 'testGObjectDestructionAccess.js', 0,
+ 'testExceptionInDestroyedObjectEmit');
+ });
+
+ it('Proto function toString', () => {
+ expect(destroyedWindow.toString()).toMatch(/\[object \(FINALIZED\) instance proxy GIName:Gtk.Window jsobj@0x[a-f0-9]+ native@0x[a-f0-9]+\]/);
+ });
+});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/installed-tests/js/testImporter.js new/gjs-1.50.4/installed-tests/js/testImporter.js
--- old/gjs-1.50.2/installed-tests/js/testImporter.js 2017-09-08 05:55:00.000000000 +0200
+++ new/gjs-1.50.4/installed-tests/js/testImporter.js 2018-01-10 06:53:47.000000000 +0100
@@ -221,4 +221,9 @@
expect(keys).not.toContain('searchPath');
});
});
+
+ it("doesn't crash when resolving a non-string property", function () {
+ expect(imports[0]).not.toBeDefined();
+ expect(imports.foobar[0]).not.toBeDefined();
+ });
});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/installed-tests/js/testParamSpec.js new/gjs-1.50.4/installed-tests/js/testParamSpec.js
--- old/gjs-1.50.2/installed-tests/js/testParamSpec.js 2017-04-24 21:46:06.000000000 +0200
+++ new/gjs-1.50.4/installed-tests/js/testParamSpec.js 2018-01-10 06:53:47.000000000 +0100
@@ -40,3 +40,10 @@
testParamSpec('flags', [Regress.TestFlags, Regress.TestFlags.FLAG2],
Regress.TestFlags.FLAG2);
testParamSpec('object', [GObject.Object], null);
+
+describe('GObject.ParamSpec object', function () {
+ it("doesn't crash when resolving a non-string property", function () {
+ let paramSpec = GObject.ParamSpec.string(name, nick, blurb, flags, '');
+ expect(paramSpec[0]).not.toBeDefined();
+ });
+});
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.50.2/win32/config.h.win32 new/gjs-1.50.4/win32/config.h.win32
--- old/gjs-1.50.2/win32/config.h.win32 2017-10-31 17:02:37.000000000 +0100
+++ new/gjs-1.50.4/win32/config.h.win32 2018-01-27 23:49:57.000000000 +0100
@@ -13,7 +13,7 @@
#define GETTEXT_PACKAGE "gjs"
/* The gjs version as an integer */
-#define GJS_VERSION 15002
+#define GJS_VERSION 15004
/* define if the compiler supports basic C++11 syntax */
#define HAVE_CXX11 1
@@ -74,7 +74,7 @@
#define PACKAGE_NAME "gjs"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "gjs 1.50.2"
+#define PACKAGE_STRING "gjs 1.50.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "gjs"
@@ -83,10 +83,10 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.50.2"
+#define PACKAGE_VERSION "1.50.4"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
-#define VERSION "1.50.2"
+#define VERSION "1.50.4"