[gjs: 1/4] Add test for the crash when GTK vfuncs are called on context destroy.
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/4] Add test for the crash when GTK vfuncs are called on context destroy.
- Date: Tue, 23 Oct 2018 14:34:21 +0000 (UTC)
commit 1a86e401d3cc905b168f7e5ed283fec967b09580
Author: Andrea Azzarone <andrea azzarone canonical com>
Date: Tue Oct 23 00:33:30 2018 +0100
Add test for the crash when GTK vfuncs are called on context destroy.
installed-tests/scripts/testCommandLine.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/installed-tests/scripts/testCommandLine.sh b/installed-tests/scripts/testCommandLine.sh
index a3d8738c..f6ab5d9c 100755
--- a/installed-tests/scripts/testCommandLine.sh
+++ b/installed-tests/scripts/testCommandLine.sh
@@ -219,6 +219,21 @@ report "main program exceptions are not swallowed by queued promise jobs"
$gjs -c 'new imports.gi.Gio.Subprocess({argv: ["true"]}).init(null);'
report "object unref from other thread after shutdown should not race"
+# https://gitlab.gnome.org/GNOME/gjs/issues/212
+if test -n "$ENABLE_GTK"; then
+ $gjs -c 'imports.gi.versions.Gtk = "3.0";
+ const Gtk = imports.gi.Gtk;
+ const GObject = imports.gi.GObject;
+ Gtk.init(null);
+ let BadWidget = GObject.registerClass(class BadWidget extends Gtk.Widget {
+ vfunc_destroy() {};
+ });
+ let w = new BadWidget ();'
+ report "avoid crashing when GTK vfuncs are called on context destroy"
+else
+ skip "avoid crashing when GTK vfuncs are called on context destroy" "GTK disabled"
+fi
+
rm -f exit.js help.js promise.js awaitcatch.js
echo "1..$total"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]