Hello community, here is the log from the commit of package gjs for openSUSE:Factory checked in at Wed Feb 2 01:51:22 CET 2011. -------- --- GNOME/gjs/gjs.changes 2011-01-17 10:24:24.000000000 +0100 +++ /mounts/work_src_done/STABLE/gjs/gjs.changes 2011-01-27 14:25:56.000000000 +0100 @@ -1,0 +2,8 @@ +Thu Jan 27 14:12:15 CET 2011 - vuntz@opensuse.org + +- Update to version 0.7.10: + + xul2: use JS_NewCompartmentAndGlobalObject to avoid crash with + latest xulrunner 2. + + console: don't segfault on huge lines + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- gjs-0.7.9.tar.bz2 New: ---- gjs-0.7.10.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gjs.spec ++++++ --- /var/tmp/diff_new_pack.aF1qYv/_old 2011-02-02 01:50:20.000000000 +0100 +++ /var/tmp/diff_new_pack.aF1qYv/_new 2011-02-02 01:50:20.000000000 +0100 @@ -27,7 +27,7 @@ %endif Name: gjs -Version: 0.7.9 +Version: 0.7.10 Release: 1 # FIXME: find out if tapsets should really be in devel package or in main package License: MIT License (or similar) ++++++ gjs-0.7.9.tar.bz2 -> gjs-0.7.10.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-0.7.9/config.h.in new/gjs-0.7.10/config.h.in --- old/gjs-0.7.9/config.h.in 2011-01-12 21:36:15.000000000 +0100 +++ new/gjs-0.7.10/config.h.in 2011-01-25 23:12:56.000000000 +0100 @@ -37,6 +37,9 @@ /* Define if we have JS_IsScriptFrame */ #undef HAVE_JS_ISSCRIPTFRAME +/* Define if we have JS_NewCompartmentAndGlobalObject */ +#undef HAVE_JS_NEWCOMPARTMENTANDGLOBALOBJECT + /* Define if you have the readline library (-lreadline). */ #undef HAVE_LIBREADLINE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-0.7.9/configure new/gjs-0.7.10/configure --- old/gjs-0.7.9/configure 2011-01-12 21:36:14.000000000 +0100 +++ new/gjs-0.7.10/configure 2011-01-25 23:12:55.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for gjs 0.7.9. +# Generated by GNU Autoconf 2.68 for gjs 0.7.10. # # Report bugs to http://bugzilla.gnome.org/enter_bug.cgi?product=gjs. # @@ -571,8 +571,8 @@ # Identity of this package. PACKAGE_NAME='gjs' PACKAGE_TARNAME='gjs' -PACKAGE_VERSION='0.7.9' -PACKAGE_STRING='gjs 0.7.9' +PACKAGE_VERSION='0.7.10' +PACKAGE_STRING='gjs 0.7.10' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gjs' PACKAGE_URL='' @@ -1369,7 +1369,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 0.7.9 to adapt to many kinds of systems. +\`configure' configures gjs 0.7.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1439,7 +1439,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gjs 0.7.9:";; + short | recursive ) echo "Configuration of gjs 0.7.10:";; esac cat <<\_ACEOF @@ -1579,7 +1579,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gjs configure 0.7.9 +gjs configure 0.7.10 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2069,7 +2069,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 0.7.9, which was +It was created by gjs $as_me 0.7.10, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2884,7 +2884,7 @@ # Define the identity of the package. PACKAGE='gjs' - VERSION='0.7.9' + VERSION='0.7.10' cat >>confdefs.h <<_ACEOF @@ -16183,6 +16183,48 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_NewCompartmentAndGlobalObject in -lmozjs" >&5 +$as_echo_n "checking for JS_NewCompartmentAndGlobalObject in -lmozjs... " >&6; } +if ${ac_cv_lib_mozjs_JS_NewCompartmentAndGlobalObject+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmozjs $JS_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char JS_NewCompartmentAndGlobalObject (); +int +main () +{ +return JS_NewCompartmentAndGlobalObject (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mozjs_JS_NewCompartmentAndGlobalObject=yes +else + ac_cv_lib_mozjs_JS_NewCompartmentAndGlobalObject=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mozjs_JS_NewCompartmentAndGlobalObject" >&5 +$as_echo "$ac_cv_lib_mozjs_JS_NewCompartmentAndGlobalObject" >&6; } +if test "x$ac_cv_lib_mozjs_JS_NewCompartmentAndGlobalObject" = xyes; then : + +$as_echo "#define HAVE_JS_NEWCOMPARTMENTANDGLOBALOBJECT 1" >>confdefs.h + +fi + else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -17760,7 +17802,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 0.7.9, which was +This file was extended by gjs $as_me 0.7.10, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17826,7 +17868,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 0.7.9 +gjs config.status 0.7.10 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-0.7.9/configure.ac new/gjs-0.7.10/configure.ac --- old/gjs-0.7.9/configure.ac 2011-01-12 21:35:03.000000000 +0100 +++ new/gjs-0.7.10/configure.ac 2011-01-25 23:11:30.000000000 +0100 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([gjs], [0.7.9],[http://bugzilla.gnome.org/enter_bug.cgi?product=gjs]) +AC_INIT([gjs], [0.7.10],[http://bugzilla.gnome.org/enter_bug.cgi?product=gjs]) AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip]) AC_CONFIG_SRCDIR([gjs/console.c]) AC_CONFIG_HEADER([config.h]) @@ -160,6 +160,9 @@ , [$JS_LIBS]) AC_CHECK_LIB([mozjs], [JS_EndPC], AC_DEFINE([HAVE_JS_ENDPC], [1], [Define if we have JS_EndPC]), , [$JS_LIBS]) + AC_CHECK_LIB([mozjs], [JS_NewCompartmentAndGlobalObject], + AC_DEFINE([HAVE_JS_NEWCOMPARTMENTANDGLOBALOBJECT], [1], [Define if we have JS_NewCompartmentAndGlobalObject]), + , [$JS_LIBS]) else AC_MSG_RESULT([no]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-0.7.9/gjs/jsapi-util.c new/gjs-0.7.10/gjs/jsapi-util.c --- old/gjs-0.7.9/gjs/jsapi-util.c 2011-01-14 21:34:45.000000000 +0100 +++ new/gjs-0.7.10/gjs/jsapi-util.c 2011-01-17 17:14:12.000000000 +0100 @@ -255,7 +255,11 @@ { JSObject *global; #ifdef HAVE_MOZJS_2 +#ifdef HAVE_JS_NEWCOMPARTMENTANDGLOBALOBJECT + global = JS_NewCompartmentAndGlobalObject(context, &global_class, NULL); +#else global = JS_NewGlobalObject(context, &global_class); +#endif /* HAVE_JS_NEWCOMPARTMENTANDGLOBALOBJECT */ if (global == NULL) return FALSE; #else @@ -263,7 +267,7 @@ if (global == NULL) return FALSE; JS_SetGlobalObject(context, global); -#endif +#endif /* HAVE_MOZJS_2 */ if (!JS_InitStandardClasses(context, global)) return FALSE; return TRUE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gjs-0.7.9/modules/console.c new/gjs-0.7.10/modules/console.c --- old/gjs-0.7.9/modules/console.c 2010-12-04 00:04:20.000000000 +0100 +++ new/gjs-0.7.10/modules/console.c 2011-01-22 00:53:23.000000000 +0100 @@ -129,29 +129,27 @@ #ifdef HAVE_LIBREADLINE static JSBool -gjs_console_readline(JSContext *cx, char *bufp, FILE *file, const char *prompt) +gjs_console_readline(JSContext *cx, char **bufp, FILE *file, const char *prompt) { char *line; line = readline(prompt); - if (line && line[0] != '\0') - add_history(line); - if (!line) { + if (!line) return JS_FALSE; - } - strcpy(bufp, line); - free(line); + if (line[0] != '\0') + add_history(line); + *bufp = line; return JS_TRUE; } #else static JSBool -gjs_console_readline(JSContext *cx, char *bufp, FILE *file, const char *prompt) +gjs_console_readline(JSContext *cx, char **bufp, FILE *file, const char *prompt) { char line[256]; fprintf(stdout, prompt); fflush(stdout); if (!fgets(line, sizeof line, file)) return JS_FALSE; - strcpy(bufp, line); + *bufp = g_strdup(line); return JS_TRUE; } #endif @@ -163,11 +161,11 @@ { JSObject *object = JS_THIS_OBJECT(context, vp); gboolean eof = FALSE; - JSScript *script; + JSScript *script = NULL; jsval result; JSString *str; - char buffer[4096]; - char *bufp; + GString *buffer = NULL; + char *temp_buf = NULL; int lineno; int startline; FILE *file = stdin; @@ -177,9 +175,6 @@ /* It's an interactive filehandle; drop into read-eval-print loop. */ lineno = 1; do { - bufp = buffer; - *bufp = '\0'; - /* * Accumulate lines until we get a 'compilable unit' - one that either * generates an error (before running out of source) or that compiles @@ -187,17 +182,19 @@ * coincides with the end of a line. */ startline = lineno; + buffer = g_string_new(""); do { - if (!gjs_console_readline(context, bufp, file, + if (!gjs_console_readline(context, &temp_buf, file, startline == lineno ? "gjs> " : ".... ")) { eof = JS_TRUE; break; } - bufp += strlen(bufp); + g_string_append(buffer, temp_buf); + g_free(temp_buf); lineno++; - } while (!JS_BufferIsCompilableUnit(context, object, buffer, strlen(buffer))); + } while (!JS_BufferIsCompilableUnit(context, object, buffer->str, buffer->len)); - script = JS_CompileScript(context, object, buffer, strlen(buffer), "typein", + script = JS_CompileScript(context, object, buffer->str, buffer->len, "typein", startline); if (script) @@ -207,7 +204,7 @@ str = JS_ValueToString(context, result); JS_ClearPendingException(context); } else if (result == JSVAL_VOID) { - continue; + goto next; } else { str = JS_ValueToString(context, result); } @@ -221,8 +218,10 @@ } } + next: if (script) JS_DestroyScript(context, script); + g_string_free(buffer, TRUE); } while (!eof); g_fprintf(stdout, "\n"); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org