Hello community, here is the log from the commit of package gjs for openSUSE:Factory checked in at 2019-05-10 09:17:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gjs (Old) and /work/SRC/openSUSE:Factory/.gjs.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gjs" Fri May 10 09:17:55 2019 rev:81 rq:701617 version:1.56.2 Changes: -------- --- /work/SRC/openSUSE:Factory/gjs/gjs.changes 2019-05-03 22:11:24.411392598 +0200 +++ /work/SRC/openSUSE:Factory/.gjs.new.5148/gjs.changes 2019-05-10 09:17:58.072295700 +0200 @@ -1,0 +2,11 @@ +Wed May 8 08:27:47 UTC 2019 - Bjørn Lie <[email protected]> + +- Update to version 1.56.2: + + Crash in BoxedInstance when struct could not be allocated + directly. + + Cairo conversion bugs fixed. + + Gjs crashes when binding inherited property to js added + gobject-property. + + console: Don't accept --profile after the script name. + +------------------------------------------------------------------- Old: ---- gjs-1.56.1.tar.xz New: ---- gjs-1.56.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gjs.spec ++++++ --- /var/tmp/diff_new_pack.k9qBqf/_old 2019-05-10 09:17:59.320297630 +0200 +++ /var/tmp/diff_new_pack.k9qBqf/_new 2019-05-10 09:17:59.344297667 +0200 @@ -21,7 +21,7 @@ # remove all conditional macros and enable systemtap. %bcond_with systemtap Name: gjs -Version: 1.56.1 +Version: 1.56.2 Release: 0 Summary: JavaScript bindings based on gobject-introspection and Mozilla License: MIT AND LGPL-2.0-or-later ++++++ gjs-1.56.1.tar.xz -> gjs-1.56.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/NEWS new/gjs-1.56.2/NEWS --- old/gjs-1.56.1/NEWS 2019-04-08 08:55:16.000000000 +0200 +++ new/gjs-1.56.2/NEWS 2019-05-08 01:44:18.000000000 +0200 @@ -1,3 +1,15 @@ +Version 1.56.2 +-------------- + +- Closed bugs and merge requests: + * Crash in BoxedInstance when struct could not be allocated directly [#240, + !285, Philip Chimento] + * Cairo conversion bugs [!286, Philip Chimento] + * Gjs crashes when binding inherited property to js added gobject-property + [#246, !289, Marco Trevisan] + * console: Don't accept --profile after the script name [!287, Philip + Chimento] + Version 1.56.1 -------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/config.sub new/gjs-1.56.2/config.sub --- old/gjs-1.56.1/config.sub 2019-04-08 08:26:49.000000000 +0200 +++ new/gjs-1.56.2/config.sub 2019-05-08 01:45:50.000000000 +0200 @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-03-08' +timestamp='2018-05-05' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -110,28 +110,48 @@ exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; +# Spilt fields of configuration type +IFS="-" read -r field1 field2 field3 field4 <<EOF +$1 +EOF + +# Separate into logical components for further validation +case $1 in + *-*-*-*) + basic_machine=$field1-$field2 + os=-$field3-$field4 + ;; + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + os=-$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + os=-linux-android + ;; + *) + basic_machine=$field1-$field2 + os=-$field3 + ;; + esac + ;; + *-*) + basic_machine=$field1 + os=-$field2 + ;; + *) + basic_machine=$1 + os= + ;; esac ### Let's recognize common machines as not being operating systems so @@ -249,12 +269,12 @@ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ - | c4x | c8051 | clipper \ + | c4x | c8051 | clipper | csky \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ @@ -293,6 +313,7 @@ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ + | nfp \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ @@ -335,6 +356,10 @@ ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) ;; + m9s12z | m68hcs12z | hcs12z | s12z) + basic_machine=s12z-unknown + os=-none + ;; ms1) basic_machine=mt-unknown ;; @@ -378,7 +403,7 @@ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -419,6 +444,7 @@ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ + | nfp-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ @@ -1334,7 +1360,7 @@ # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if [ x$os != x ] then case $os in # First match some system type aliases that might get confused @@ -1524,6 +1550,12 @@ ;; -none) ;; + -*-eabi) + case $basic_machine in + arm*) + ;; + esac + ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/configure new/gjs-1.56.2/configure --- old/gjs-1.56.1/configure 2019-04-08 08:26:47.000000000 +0200 +++ new/gjs-1.56.2/configure 2019-05-08 01:45:49.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gjs 1.56.1. +# Generated by GNU Autoconf 2.69 for gjs 1.56.2. # # 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.56.1' -PACKAGE_STRING='gjs 1.56.1' +PACKAGE_VERSION='1.56.2' +PACKAGE_STRING='gjs 1.56.2' PACKAGE_BUGREPORT='https://gitlab.gnome.org/GNOME/gjs/issues' PACKAGE_URL='https://wiki.gnome.org/Projects/Gjs' @@ -1449,7 +1449,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.56.1 to adapt to many kinds of systems. +\`configure' configures gjs 1.56.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1519,7 +1519,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gjs 1.56.1:";; + short | recursive ) echo "Configuration of gjs 1.56.2:";; esac cat <<\_ACEOF @@ -1697,7 +1697,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gjs configure 1.56.1 +gjs configure 1.56.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2248,7 +2248,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.56.1, which was +It was created by gjs $as_me 1.56.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3111,7 +3111,7 @@ # Define the identity of the package. PACKAGE='gjs' - VERSION='1.56.1' + VERSION='1.56.2' cat >>confdefs.h <<_ACEOF @@ -3338,10 +3338,10 @@ -GJS_VERSION=15601 +GJS_VERSION=15602 -$as_echo "#define GJS_VERSION (1 * 100 + 56) * 100 + 1" >>confdefs.h +$as_echo "#define GJS_VERSION (1 * 100 + 56) * 100 + 2" >>confdefs.h GETTEXT_PACKAGE=gjs @@ -14086,6 +14086,9 @@ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -14094,7 +14097,7 @@ # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -18048,6 +18051,9 @@ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -18056,7 +18062,7 @@ # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -21581,8 +21587,8 @@ pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GOBJECT_REQUIREMENT $gjs_packages" >&5 -$as_echo_n "checking for $GOBJECT_REQUIREMENT $gjs_packages... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GJS" >&5 +$as_echo_n "checking for GJS... " >&6; } if test -n "$GJS_CFLAGS"; then pkg_cv_GJS_CFLAGS="$GJS_CFLAGS" @@ -21622,7 +21628,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -21649,7 +21655,7 @@ and GJS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -21677,8 +21683,8 @@ pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gjs_base_packages" >&5 -$as_echo_n "checking for $gjs_base_packages... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GJS_GDBUS" >&5 +$as_echo_n "checking for GJS_GDBUS... " >&6; } if test -n "$GJS_GDBUS_CFLAGS"; then pkg_cv_GJS_GDBUS_CFLAGS="$GJS_GDBUS_CFLAGS" @@ -21718,7 +21724,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -21745,7 +21751,7 @@ and GJS_GDBUS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -21768,8 +21774,8 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gjs_base_packages" >&5 -$as_echo_n "checking for $gjs_base_packages... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GJS_CONSOLE" >&5 +$as_echo_n "checking for GJS_CONSOLE... " >&6; } if test -n "$GJS_CONSOLE_CFLAGS"; then pkg_cv_GJS_CONSOLE_CFLAGS="$GJS_CONSOLE_CFLAGS" @@ -21809,7 +21815,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -21836,7 +21842,7 @@ and GJS_CONSOLE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -21951,8 +21957,8 @@ pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gjs_cairo_packages" >&5 -$as_echo_n "checking for $gjs_cairo_packages... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GJS_CAIRO" >&5 +$as_echo_n "checking for GJS_CAIRO... " >&6; } if test -n "$GJS_CAIRO_CFLAGS"; then pkg_cv_GJS_CAIRO_CFLAGS="$GJS_CAIRO_CFLAGS" @@ -21992,7 +21998,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -22010,7 +22016,7 @@ have_cairo=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_cairo=no else @@ -22050,8 +22056,8 @@ pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cairo-xlib" >&5 -$as_echo_n "checking for cairo-xlib... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GJS_CAIRO_XLIB" >&5 +$as_echo_n "checking for GJS_CAIRO_XLIB... " >&6; } if test -n "$GJS_CAIRO_XLIB_CFLAGS"; then pkg_cv_GJS_CAIRO_XLIB_CFLAGS="$GJS_CAIRO_XLIB_CFLAGS" @@ -22091,7 +22097,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -22110,7 +22116,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cairo-xlib support not found" >&5 $as_echo "$as_me: WARNING: Cairo-xlib support not found" >&2;} elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cairo-xlib support not found" >&5 $as_echo "$as_me: WARNING: Cairo-xlib support not found" >&2;} @@ -22150,8 +22156,8 @@ pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gjs_gtk_packages" >&5 -$as_echo_n "checking for $gjs_gtk_packages... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GJS_GTK" >&5 +$as_echo_n "checking for GJS_GTK... " >&6; } if test -n "$GJS_GTK_CFLAGS"; then pkg_cv_GJS_GTK_CFLAGS="$GJS_GTK_CFLAGS" @@ -22191,7 +22197,7 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -22209,7 +22215,7 @@ have_gtk=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_gtk=no else @@ -24031,7 +24037,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.56.1, which was +This file was extended by gjs $as_me 1.56.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24102,7 +24108,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.56.1 +gjs config.status 1.56.2 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.56.1/configure.ac new/gjs-1.56.2/configure.ac --- old/gjs-1.56.1/configure.ac 2019-04-08 07:38:55.000000000 +0200 +++ new/gjs-1.56.2/configure.ac 2019-05-08 01:34:57.000000000 +0200 @@ -3,7 +3,7 @@ m4_define(pkg_major_version, 1) m4_define(pkg_minor_version, 56) -m4_define(pkg_micro_version, 1) +m4_define(pkg_micro_version, 2) 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.56.1/gi/arg.cpp new/gjs-1.56.2/gi/arg.cpp --- old/gjs-1.56.1/gi/arg.cpp 2019-03-12 05:59:14.000000000 +0100 +++ new/gjs-1.56.2/gi/arg.cpp 2019-05-08 01:36:37.000000000 +0200 @@ -1222,11 +1222,8 @@ return g_array_sized_new(true, false, element_size, length); } -GJS_USE -static gchar * -get_argument_display_name(const char *arg_name, - GjsArgumentType arg_type) -{ +char* gjs_argument_display_name(const char* arg_name, + GjsArgumentType arg_type) { switch (arg_type) { case GJS_ARGUMENT_ARGUMENT: return g_strdup_printf("Argument '%s'", arg_name); @@ -1274,12 +1271,11 @@ const char *arg_name, GjsArgumentType arg_type) { - gchar *display_name = get_argument_display_name(arg_name, arg_type); + GjsAutoChar display_name = gjs_argument_display_name(arg_name, arg_type); gjs_throw(context, "Expected type %s for %s but got type '%s'", - type_tag_to_human_string(arginfo), - display_name, JS::InformalValueTypeName(value)); - g_free(display_name); + type_tag_to_human_string(arginfo), display_name.get(), + JS::InformalValueTypeName(value)); } GJS_JSAPI_RETURN_CONVENTION @@ -2066,21 +2062,18 @@ } return false; } else if (G_UNLIKELY(out_of_range)) { - gchar *display_name = get_argument_display_name (arg_name, arg_type); + GjsAutoChar display_name = + gjs_argument_display_name(arg_name, arg_type); gjs_throw(context, "value is out of range for %s (type %s)", - display_name, - g_type_tag_to_string(type_tag)); - g_free (display_name); + display_name.get(), g_type_tag_to_string(type_tag)); return false; } else if (nullable_type && arg->v_pointer == NULL && !may_be_null) { - gchar *display_name = get_argument_display_name (arg_name, arg_type); - gjs_throw(context, - "%s (type %s) may not be null", - display_name, + GjsAutoChar display_name = + gjs_argument_display_name(arg_name, arg_type); + gjs_throw(context, "%s (type %s) may not be null", display_name.get(), g_type_tag_to_string(type_tag)); - g_free (display_name); return false; } else { return true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/gi/arg.h new/gjs-1.56.2/gi/arg.h --- old/gjs-1.56.1/gi/arg.h 2019-03-08 06:56:59.000000000 +0100 +++ new/gjs-1.56.2/gi/arg.h 2019-05-08 01:36:37.000000000 +0200 @@ -34,7 +34,8 @@ G_BEGIN_DECLS -/* Different roles for a GArgument */ +// Different roles for a GIArgument; currently used only in exception and debug +// messages. typedef enum { GJS_ARGUMENT_ARGUMENT, GJS_ARGUMENT_RETURN_VALUE, @@ -44,6 +45,9 @@ GJS_ARGUMENT_ARRAY_ELEMENT } GjsArgumentType; +GJS_USE +char* gjs_argument_display_name(const char* arg_name, GjsArgumentType arg_type); + GJS_JSAPI_RETURN_CONVENTION bool gjs_value_to_arg(JSContext *context, JS::HandleValue value, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/gi/boxed.cpp new/gjs-1.56.2/gi/boxed.cpp --- old/gjs-1.56.1/gi/boxed.cpp 2019-03-12 05:59:14.000000000 +0100 +++ new/gjs-1.56.2/gi/boxed.cpp 2019-05-08 01:36:06.000000000 +0200 @@ -44,7 +44,8 @@ #include <girepository.h> BoxedInstance::BoxedInstance(JSContext* cx, JS::HandleObject obj) - : GIWrapperInstance(cx, obj) { + : GIWrapperInstance(cx, obj), m_owning_ptr(false) { + m_ptr = nullptr; GJS_INC_COUNTER(boxed_instance); } @@ -113,7 +114,7 @@ void BoxedInstance::allocate_directly(void) { g_assert(get_prototype()->can_allocate_directly()); - m_ptr = g_slice_alloc0(g_struct_info_get_size(info())); + own_ptr(g_slice_alloc0(g_struct_info_get_size(info()))); m_allocated_directly = true; debug_lifecycle("Boxed pointer directly allocated"); @@ -254,7 +255,7 @@ * pointer or another BoxedInstance. */ void BoxedInstance::copy_boxed(void* boxed_ptr) { - m_ptr = g_boxed_copy(gtype(), boxed_ptr); + own_ptr(g_boxed_copy(gtype(), boxed_ptr)); debug_lifecycle("Boxed pointer created with g_boxed_copy()"); } @@ -307,7 +308,6 @@ // The return value of GLib.Variant.new_internal() gets its own // BoxedInstance, and the one we're setting up in this constructor is // discarded. - m_not_owning_ptr = true; debug_lifecycle( "Boxed construction delegated to GVariant constructor, " "boxed object discarded"); @@ -338,7 +338,7 @@ return false; } - m_ptr = rval_arg.v_pointer; + own_ptr(rval_arg.v_pointer); debug_lifecycle("Boxed pointer created from zero-args constructor"); @@ -361,9 +361,7 @@ } // The return value of the JS constructor gets its own BoxedInstance, - // and this one is discarded. Mark that the boxed pointer doesn't need - // to be freed, since it remains null. - m_not_owning_ptr = true; + // and this one is discarded. debug_lifecycle( "Boxed construction delegated to JS constructor, " "boxed object discarded"); @@ -393,7 +391,7 @@ } BoxedInstance::~BoxedInstance() { - if (!m_not_owning_ptr) { + if (m_owning_ptr) { if (m_allocated_directly) { g_slice_free1(g_struct_info_get_size(info()), m_ptr); } else { @@ -476,8 +474,7 @@ BoxedInstance* priv = BoxedInstance::new_for_js_object(context, obj); /* A structure nested inside a parent object; doesn't have an independent allocation */ - priv->m_ptr = raw_ptr() + offset; - priv->m_not_owning_ptr = true; + priv->share_ptr(raw_ptr() + offset); priv->debug_lifecycle( "Boxed pointer created, pointing inside memory owned by parent"); @@ -1011,8 +1008,7 @@ bool BoxedInstance::init_from_c_struct(JSContext* cx, void* gboxed, NoCopy) { // We need to create a JS Boxed which references the original C struct, not // a copy of it. Used for G_SIGNAL_TYPE_STATIC_SCOPE. - m_ptr = gboxed; - m_not_owning_ptr = true; + share_ptr(gboxed); debug_lifecycle("Boxed pointer acquired, memory not owned"); return true; } @@ -1022,7 +1018,7 @@ copy_boxed(gboxed); return true; } else if (gtype() == G_TYPE_VARIANT) { - m_ptr = g_variant_ref_sink(static_cast<GVariant*>(gboxed)); + own_ptr(g_variant_ref_sink(static_cast<GVariant*>(gboxed))); debug_lifecycle("Boxed pointer created by sinking GVariant ref"); return true; } else if (get_prototype()->can_allocate_directly()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/gi/boxed.h new/gjs-1.56.2/gi/boxed.h --- old/gjs-1.56.1/gi/boxed.h 2019-03-12 05:59:14.000000000 +0100 +++ new/gjs-1.56.2/gi/boxed.h 2019-05-08 01:36:06.000000000 +0200 @@ -161,12 +161,25 @@ friend class BoxedBase; // for field_getter, etc. bool m_allocated_directly : 1; - bool m_not_owning_ptr : 1; // if set, the JS wrapper does not own the C - // memory referred to by m_ptr. + bool m_owning_ptr : 1; // if set, the JS wrapper owns the C memory referred + // to by m_ptr. explicit BoxedInstance(JSContext* cx, JS::HandleObject obj); ~BoxedInstance(void); + // Don't set GIWrapperBase::m_ptr directly. Instead, use one of these + // setters to express your intention to own the pointer or not. + void own_ptr(void* boxed_ptr) { + g_assert(!m_ptr); + m_ptr = boxed_ptr; + m_owning_ptr = true; + } + void share_ptr(void* unowned_boxed_ptr) { + g_assert(!m_ptr); + m_ptr = unowned_boxed_ptr; + m_owning_ptr = false; + } + // Methods for different ways to allocate the GBoxed pointer void allocate_directly(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/gi/gobject.cpp new/gjs-1.56.2/gi/gobject.cpp --- old/gjs-1.56.1/gi/gobject.cpp 2019-03-12 05:59:14.000000000 +0100 +++ new/gjs-1.56.2/gi/gobject.cpp 2019-05-08 01:38:32.000000000 +0200 @@ -143,6 +143,8 @@ JSContext *cx = current_context(); JS::RootedObject js_obj(cx, priv->wrapper()); + JSAutoCompartment ac(cx, js_obj); + if (!jsobj_set_gproperty(cx, js_obj, value, pspec)) gjs_log_exception(cx); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/gjs/console.cpp new/gjs-1.56.2/gjs/console.cpp --- old/gjs-1.56.1/gjs/console.cpp 2019-02-05 21:18:31.000000000 +0100 +++ new/gjs-1.56.2/gjs/console.cpp 2019-05-08 01:39:51.000000000 +0200 @@ -42,7 +42,6 @@ static gboolean parse_profile_arg(const char *, const char *, void *, GError **); -/* Keep in sync with entries in check_script_args_for_stray_gjs_args() */ // clang-format off static GOptionEntry entries[] = { { "version", 0, 0, G_OPTION_ARG_NONE, &print_version, "Print GJS version and exit" }, @@ -115,19 +114,6 @@ return true; } -static gboolean -check_stray_profile_arg(const char *option_name, - const char *value, - void *data, - GError **error_out) -{ - g_warning("You used the --profile option after the script on the GJS " - "command line. Support for this will be removed in a future " - "version. Place the option before the script or use the " - "GJS_ENABLE_PROFILER environment variable."); - return parse_profile_arg(option_name, value, data, error_out); -} - static void check_script_args_for_stray_gjs_args(int argc, char * const *argv) @@ -136,13 +122,13 @@ char **new_coverage_prefixes = NULL; char *new_coverage_output_path = NULL; char **new_include_paths = NULL; - /* Keep in sync with entries[] at the top */ + // Don't add new entries here. This is only for arguments that were + // previously accepted after the script name on the command line, for + // backwards compatibility. static GOptionEntry script_check_entries[] = { { "coverage-prefix", 'C', 0, G_OPTION_ARG_STRING_ARRAY, &new_coverage_prefixes }, { "coverage-output", 0, 0, G_OPTION_ARG_STRING, &new_coverage_output_path }, { "include-path", 'I', 0, G_OPTION_ARG_STRING_ARRAY, &new_include_paths }, - { "profile", 0, G_OPTION_FLAG_OPTIONAL_ARG | G_OPTION_FLAG_FILENAME, - G_OPTION_ARG_CALLBACK, reinterpret_cast<void *>(&check_stray_profile_arg) }, { NULL } }; char **argv_copy = g_new(char *, argc + 2); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/installed-tests/scripts/testCommandLine.sh new/gjs-1.56.2/installed-tests/scripts/testCommandLine.sh --- old/gjs-1.56.1/installed-tests/scripts/testCommandLine.sh 2019-01-17 08:31:11.000000000 +0100 +++ new/gjs-1.56.2/installed-tests/scripts/testCommandLine.sh 2019-05-08 01:39:51.000000000 +0200 @@ -155,9 +155,6 @@ $gjs -c 'imports.system.exit(0)' --coverage-prefix=foo --coverage-output=foo 2>&1 | grep -q 'Gjs-WARNING.*--coverage-output' report "--coverage-output after script should succeed but give a warning" rm -f foo/coverage.lcov -$gjs -c 'imports.system.exit(0)' --profile=foo 2>&1 | grep -q 'Gjs-WARNING.*--profile' -report "--profile after script should succeed but give a warning" -rm -rf foo for version_arg in --version --jsversion; do # --version and --jsversion work diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/ltmain.sh new/gjs-1.56.2/ltmain.sh --- old/gjs-1.56.1/ltmain.sh 2019-04-08 08:26:39.000000000 +0200 +++ new/gjs-1.56.2/ltmain.sh 2019-05-08 01:45:42.000000000 +0200 @@ -2124,7 +2124,7 @@ # a configuration failure hint, and exit. func_fatal_configuration () { - func__fatal_error ${1+"$@"} \ + func_fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } @@ -7272,10 +7272,12 @@ # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -specs=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" Binary files old/gjs-1.56.1/m4/._libtool.m4 and new/gjs-1.56.2/m4/._libtool.m4 differ Binary files old/gjs-1.56.1/m4/._ltoptions.m4 and new/gjs-1.56.2/m4/._ltoptions.m4 differ Binary files old/gjs-1.56.1/m4/._ltsugar.m4 and new/gjs-1.56.2/m4/._ltsugar.m4 differ Binary files old/gjs-1.56.1/m4/._lt~obsolete.m4 and new/gjs-1.56.2/m4/._lt~obsolete.m4 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/m4/libtool.m4 new/gjs-1.56.2/m4/libtool.m4 --- old/gjs-1.56.1/m4/libtool.m4 2019-04-08 08:26:40.000000000 +0200 +++ new/gjs-1.56.2/m4/libtool.m4 2019-05-08 01:45:42.000000000 +0200 @@ -2867,6 +2867,9 @@ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command @@ -2875,7 +2878,7 @@ # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/m4/pkg.m4 new/gjs-1.56.2/m4/pkg.m4 --- old/gjs-1.56.1/m4/pkg.m4 2019-01-13 00:50:35.000000000 +0100 +++ new/gjs-1.56.2/m4/pkg.m4 2019-03-10 01:49:18.000000000 +0100 @@ -1,5 +1,5 @@ # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 12 (pkg-config-0.29.2) +# serial 11 (pkg-config-0.29.1) dnl Copyright © 2004 Scott James Remnant <[email protected]>. dnl Copyright © 2012-2015 Dan Nicholson <[email protected]> @@ -41,7 +41,7 @@ dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.2]) +[m4_define([PKG_MACROS_VERSION], [0.29.1]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ @@ -142,7 +142,7 @@ AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $2]) +AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) @@ -152,11 +152,11 @@ See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs @@ -173,7 +173,7 @@ _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full @@ -273,3 +273,71 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR + +dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------ +dnl +dnl Prepare a "--with-" configure option using the lowercase +dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and +dnl PKG_CHECK_MODULES in a single macro. +AC_DEFUN([PKG_WITH_MODULES], +[ +m4_pushdef([with_arg], m4_tolower([$1])) + +m4_pushdef([description], + [m4_default([$5], [build with ]with_arg[ support])]) + +m4_pushdef([def_arg], [m4_default([$6], [auto])]) +m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) +m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) + +m4_case(def_arg, + [yes],[m4_pushdef([with_without], [--without-]with_arg)], + [m4_pushdef([with_without],[--with-]with_arg)]) + +AC_ARG_WITH(with_arg, + AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, + [AS_TR_SH([with_]with_arg)=def_arg]) + +AS_CASE([$AS_TR_SH([with_]with_arg)], + [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], + [auto],[PKG_CHECK_MODULES([$1],[$2], + [m4_n([def_action_if_found]) $3], + [m4_n([def_action_if_not_found]) $4])]) + +m4_popdef([with_arg]) +m4_popdef([description]) +m4_popdef([def_arg]) + +])dnl PKG_WITH_MODULES + +dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ----------------------------------------------- +dnl +dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES +dnl check._[VARIABLE-PREFIX] is exported as make variable. +AC_DEFUN([PKG_HAVE_WITH_MODULES], +[ +PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) + +AM_CONDITIONAL([HAVE_][$1], + [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) +])dnl PKG_HAVE_WITH_MODULES + +dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, +dnl [DESCRIPTION], [DEFAULT]) +dnl ------------------------------------------------------ +dnl +dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after +dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make +dnl and preprocessor variable. +AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], +[ +PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) + +AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], + [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) +])dnl PKG_HAVE_DEFINE_WITH_MODULES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/modules/cairo-context.cpp new/gjs-1.56.2/modules/cairo-context.cpp --- old/gjs-1.56.1/modules/cairo-context.cpp 2019-03-08 05:17:07.000000000 +0100 +++ new/gjs-1.56.2/modules/cairo-context.cpp 2019-05-08 01:36:40.000000000 +0200 @@ -976,7 +976,19 @@ bool may_be_null, GArgument *arg) { - JS::RootedObject obj(context, value.toObjectOrNull()); + if (value.isNull()) { + if (!may_be_null) { + GjsAutoChar display_name = + gjs_argument_display_name(arg_name, argument_type); + gjs_throw(context, "%s may not be null", display_name.get()); + return false; + } + + arg->v_pointer = nullptr; + return true; + } + + JS::RootedObject obj(context, &value.toObject()); cairo_t *cr; cr = gjs_cairo_context_get_context(context, obj); @@ -1012,7 +1024,8 @@ GITransfer transfer, GArgument *arg) { - cairo_destroy((cairo_t*)arg->v_pointer); + if (transfer != GI_TRANSFER_NOTHING) + cairo_destroy(static_cast<cairo_t*>(arg->v_pointer)); return true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/modules/cairo-region.cpp new/gjs-1.56.2/modules/cairo-region.cpp --- old/gjs-1.56.1/modules/cairo-region.cpp 2019-02-05 21:18:31.000000000 +0100 +++ new/gjs-1.56.2/modules/cairo-region.cpp 2019-05-08 01:36:40.000000000 +0200 @@ -314,6 +314,18 @@ bool may_be_null, GArgument *arg) { + if (value.isNull()) { + if (!may_be_null) { + GjsAutoChar display_name = + gjs_argument_display_name(arg_name, argument_type); + gjs_throw(context, "%s may not be null", display_name.get()); + return false; + } + + arg->v_pointer = nullptr; + return true; + } + JS::RootedObject obj(context, &value.toObject()); cairo_region_t *region; @@ -348,7 +360,8 @@ GITransfer transfer, GArgument *arg) { - cairo_region_destroy((cairo_region_t*)arg->v_pointer); + if (transfer != GI_TRANSFER_NOTHING) + cairo_region_destroy(static_cast<cairo_region_t*>(arg->v_pointer)); return true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/modules/cairo-surface.cpp new/gjs-1.56.2/modules/cairo-surface.cpp --- old/gjs-1.56.1/modules/cairo-surface.cpp 2019-02-05 21:18:31.000000000 +0100 +++ new/gjs-1.56.2/modules/cairo-surface.cpp 2019-05-08 01:36:40.000000000 +0200 @@ -255,6 +255,18 @@ bool may_be_null, GArgument *arg) { + if (value.isNull()) { + if (!may_be_null) { + GjsAutoChar display_name = + gjs_argument_display_name(arg_name, argument_type); + gjs_throw(context, "%s may not be null", display_name.get()); + return false; + } + + arg->v_pointer = nullptr; + return true; + } + JSObject *obj; cairo_surface_t *s; @@ -290,7 +302,8 @@ GITransfer transfer, GArgument *arg) { - cairo_surface_destroy((cairo_surface_t*)arg->v_pointer); + if (transfer != GI_TRANSFER_NOTHING) + cairo_surface_destroy(static_cast<cairo_surface_t*>(arg->v_pointer)); return true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-1.56.1/win32/config.h.win32 new/gjs-1.56.2/win32/config.h.win32 --- old/gjs-1.56.1/win32/config.h.win32 2019-04-08 08:27:09.000000000 +0200 +++ new/gjs-1.56.2/win32/config.h.win32 2019-05-08 01:46:02.000000000 +0200 @@ -13,7 +13,7 @@ #define GETTEXT_PACKAGE "gjs" /* The gjs version as an integer */ -#define GJS_VERSION 15601 +#define GJS_VERSION 15602 /* 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.56.1" +#define PACKAGE_STRING "gjs 1.56.2" /* 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.56.1" +#define PACKAGE_VERSION "1.56.2" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.56.1" +#define VERSION "1.56.2"
