Hello community,

here is the log from the commit of package gjs for openSUSE:11.4
checked in at Wed Mar 9 18:27:29 CET 2011.



--------
--- old-versions/11.4/all/gjs/gjs.changes       2011-02-21 15:43:31.000000000 
+0100
+++ 11.4/gjs/gjs.changes        2011-03-01 23:02:44.000000000 +0100
@@ -1,0 +2,17 @@
+Tue Mar  1 21:28:26 UTC 2011 - [email protected]
+
+- Update to version 0.7.11:
+  + Add gjs_context_maybe_gc() which is similar to JS_MaybeGC but
+    tries to account for native allocations made directly from libc
+    when determining if GC is useful. Also invoke after creating
+    new native objects.
+  + Adapt to additional xulrunner 2.0 changes
+  + Add back debugger module, with single nativeTrap() function to
+    trigger debugger breakpoint
+  + Fix bug with looking up namespaced native modules
+  + Memory leak fix
+  + Build fixes
+- Drop gjs-xulrunner20b11-fix.patch: fixed upstream.
+- This update addresses bnc#676079.
+
+-------------------------------------------------------------------

Package does not exist at destination yet. Using Fallback 
old-versions/11.4/all/gjs
Destination is old-versions/11.4/UPDATES/all/gjs
calling whatdependson for 11.4-i586


Old:
----
  gjs-0.7.10.tar.bz2
  gjs-xulrunner20b11-fix.patch

New:
----
  gjs-0.7.11.tar.bz2

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

Other differences:
------------------
++++++ gjs.spec ++++++
--- /var/tmp/diff_new_pack.dEWpUW/_old  2011-03-09 18:27:05.000000000 +0100
+++ /var/tmp/diff_new_pack.dEWpUW/_new  2011-03-09 18:27:05.000000000 +0100
@@ -27,16 +27,14 @@
 %endif
 
 Name:           gjs
-Version:        0.7.10
-Release:        3.<RELEASE2>
+Version:        0.7.11
+Release:        1.<RELEASE2>
 # FIXME: find out if tapsets should really be in devel package or in main 
package
 License:        MIT License (or similar)
 Summary:        JavaScript bindings based on gobject-introspection and Mozilla
 Group:          Development/Libraries/GNOME
 Url:            http://live.gnome.org/Gjs
 Source:         %{name}-%{version}.tar.bz2
-# PATCH-FIX-UPSTREAM gjs-xulrunner20b11-fix.patch [email protected] -- Taken 
from git, adapt to changes in xulrunner
-Patch0:         gjs-xulrunner20b11-fix.patch
 BuildRequires:  gcc-c++
 BuildRequires:  mozilla-xulrunner%{xulrunner_ver}-devel
 BuildRequires:  python
@@ -81,7 +79,6 @@
 
 %prep
 %setup -q
-%patch0 -p1
 
 %build
 %configure \

++++++ gjs-0.7.10.tar.bz2 -> gjs-0.7.11.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/Makefile-modules.am 
new/gjs-0.7.11/Makefile-modules.am
--- old/gjs-0.7.10/Makefile-modules.am  2010-09-23 16:27:41.000000000 +0200
+++ new/gjs-0.7.11/Makefile-modules.am  2011-02-23 04:25:10.000000000 +0100
@@ -12,7 +12,7 @@
        modules/dbus.js         \
        modules/promise.js
 
-gjsnative_LTLIBRARIES += console.la gi.la langNative.la mainloop.la 
gettextNative.la dbusNative.la cairoNative.la
+gjsnative_LTLIBRARIES += console.la debugger.la gi.la langNative.la 
mainloop.la gettextNative.la dbusNative.la cairoNative.la
 
 JS_NATIVE_MODULE_CFLAGS =      \
         $(AM_CFLAGS)           \
@@ -116,6 +116,18 @@
        modules/console.h       \
        modules/console.c
 
+debugger_la_CFLAGS =                           \
+       $(JS_NATIVE_MODULE_CFLAGS)
+debugger_la_LIBADD = \
+       libgjs-gi.la                            \
+       $(JS_NATIVE_MODULE_LIBADD)
+debugger_la_LDFLAGS =                          \
+       $(JS_NATIVE_MODULE_LDFLAGS)
+
+debugger_la_SOURCES =          \
+       modules/debugger.h      \
+       modules/debugger.c
+
 dbusNative_la_SOURCES =        \
        modules/dbus-exports.h  \
        modules/dbus-values.h   \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/Makefile.in new/gjs-0.7.11/Makefile.in
--- old/gjs-0.7.10/Makefile.in  2011-01-25 23:13:00.000000000 +0100
+++ new/gjs-0.7.11/Makefile.in  2011-02-23 04:29:38.000000000 +0100
@@ -136,6 +136,12 @@
 dbusNative_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(dbusNative_la_CFLAGS) \
        $(CFLAGS) $(dbusNative_la_LDFLAGS) $(LDFLAGS) -o $@
+debugger_la_DEPENDENCIES = libgjs-gi.la $(am__DEPENDENCIES_2)
+am_debugger_la_OBJECTS = debugger_la-debugger.lo
+debugger_la_OBJECTS = $(am_debugger_la_OBJECTS)
+debugger_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(debugger_la_CFLAGS) \
+       $(CFLAGS) $(debugger_la_LDFLAGS) $(LDFLAGS) -o $@
 gettextNative_la_DEPENDENCIES = libgjs-gi.la $(am__DEPENDENCIES_2)
 am_gettextNative_la_OBJECTS = gettextNative_la-gettext-native.lo
 gettextNative_la_OBJECTS = $(am_gettextNative_la_OBJECTS)
@@ -281,8 +287,9 @@
 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
 am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(cairoNative_la_SOURCES) $(console_la_SOURCES) \
-       $(dbusNative_la_SOURCES) $(gettextNative_la_SOURCES) \
-       $(gi_la_SOURCES) $(langNative_la_SOURCES) \
+       $(dbusNative_la_SOURCES) $(debugger_la_SOURCES) \
+       $(gettextNative_la_SOURCES) $(gi_la_SOURCES) \
+       $(langNative_la_SOURCES) \
        $(nodist_libgimarshallingtests_la_SOURCES) \
        $(libgjs_dbus_la_SOURCES) $(libgjs_gi_la_SOURCES) \
        $(libgjs_la_SOURCES) $(nodist_libregress_la_SOURCES) \
@@ -290,12 +297,12 @@
        $(gjs_tests_SOURCES) $(nodist_gjs_tests_SOURCES) \
        $(gjs_unit_SOURCES)
 DIST_SOURCES = $(cairoNative_la_SOURCES) $(console_la_SOURCES) \
-       $(dbusNative_la_SOURCES) $(gettextNative_la_SOURCES) \
-       $(gi_la_SOURCES) $(langNative_la_SOURCES) \
-       $(libgjs_dbus_la_SOURCES) $(libgjs_gi_la_SOURCES) \
-       $(libgjs_la_SOURCES) $(mainloop_la_SOURCES) \
-       $(gjs_console_SOURCES) $(gjs_tests_SOURCES) \
-       $(gjs_unit_SOURCES)
+       $(dbusNative_la_SOURCES) $(debugger_la_SOURCES) \
+       $(gettextNative_la_SOURCES) $(gi_la_SOURCES) \
+       $(langNative_la_SOURCES) $(libgjs_dbus_la_SOURCES) \
+       $(libgjs_gi_la_SOURCES) $(libgjs_la_SOURCES) \
+       $(mainloop_la_SOURCES) $(gjs_console_SOURCES) \
+       $(gjs_tests_SOURCES) $(gjs_unit_SOURCES)
 DATA = $(dist_gjsjs_DATA) $(dist_gjstweener_DATA) $(pkgconfig_DATA) \
        $(tapset_DATA)
 HEADERS = $(gjs_dbusheader_HEADERS) \
@@ -475,8 +482,8 @@
 dist_gjsjs_DATA = modules/gettext.js modules/lang.js modules/jsUnit.js \
        modules/signals.js modules/cairo.js modules/dbus.js \
        modules/promise.js
-gjsnative_LTLIBRARIES = console.la gi.la langNative.la mainloop.la \
-       gettextNative.la dbusNative.la cairoNative.la
+gjsnative_LTLIBRARIES = console.la debugger.la gi.la langNative.la \
+       mainloop.la gettextNative.la dbusNative.la cairoNative.la
 BUILT_SOURCES = $(am__append_1) $(nodist_gjs_tests_SOURCES)
 CLEANFILES = $(nodist_gjs_tests_SOURCES) gjstest.c.stamp \
        gjstest.h.stamp Regress-1.0.gir Regress-1.0.typelib \
@@ -772,6 +779,20 @@
        modules/console.h       \
        modules/console.c
 
+debugger_la_CFLAGS = \
+       $(JS_NATIVE_MODULE_CFLAGS)
+
+debugger_la_LIBADD = \
+       libgjs-gi.la                            \
+       $(JS_NATIVE_MODULE_LIBADD)
+
+debugger_la_LDFLAGS = \
+       $(JS_NATIVE_MODULE_LDFLAGS)
+
+debugger_la_SOURCES = \
+       modules/debugger.h      \
+       modules/debugger.c
+
 dbusNative_la_SOURCES = \
        modules/dbus-exports.h  \
        modules/dbus-values.h   \
@@ -1024,6 +1045,8 @@
        $(AM_V_CCLD)$(console_la_LINK) -rpath $(gjsnativedir) 
$(console_la_OBJECTS) $(console_la_LIBADD) $(LIBS)
 dbusNative.la: $(dbusNative_la_OBJECTS) $(dbusNative_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(dbusNative_la_LINK) -rpath $(gjsnativedir) 
$(dbusNative_la_OBJECTS) $(dbusNative_la_LIBADD) $(LIBS)
+debugger.la: $(debugger_la_OBJECTS) $(debugger_la_DEPENDENCIES) 
+       $(AM_V_CCLD)$(debugger_la_LINK) -rpath $(gjsnativedir) 
$(debugger_la_OBJECTS) $(debugger_la_LIBADD) $(LIBS)
 gettextNative.la: $(gettextNative_la_OBJECTS) $(gettextNative_la_DEPENDENCIES) 
        $(AM_V_CCLD)$(gettextNative_la_LINK) -rpath $(gjsnativedir) 
$(gettextNative_la_OBJECTS) $(gettextNative_la_LIBADD) $(LIBS)
 gi.la: $(gi_la_OBJECTS) $(gi_la_DEPENDENCIES) 
@@ -1128,6 +1151,7 @@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/dbusNative_la-dbus-exports.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/dbusNative_la-dbus-values.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/dbusNative_la-dbus.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/debugger_la-debugger.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/gettextNative_la-gettext-native.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gi_la-gi.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ 
@am__quote@./$(DEPDIR)/gjs_console-console.Po@am__quote@
@@ -1347,6 +1371,14 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) 
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(dbusNative_la_CFLAGS) $(CFLAGS) -c -o 
dbusNative_la-dbus.lo `test -f 'modules/dbus.c' || echo 
'$(srcdir)/'`modules/dbus.c
 
+debugger_la-debugger.lo: modules/debugger.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC 
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) 
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(debugger_la_CFLAGS) $(CFLAGS) -MT debugger_la-debugger.lo -MD -MP -MF 
$(DEPDIR)/debugger_la-debugger.Tpo -c -o debugger_la-debugger.lo `test -f 
'modules/debugger.c' || echo '$(srcdir)/'`modules/debugger.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) $(DEPDIR)/debugger_la-debugger.Tpo 
$(DEPDIR)/debugger_la-debugger.Plo
+@am__fastdepCC_FALSE@  $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='modules/debugger.c' 
object='debugger_la-debugger.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) 
$(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) 
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(debugger_la_CFLAGS) $(CFLAGS) -c -o 
debugger_la-debugger.lo `test -f 'modules/debugger.c' || echo 
'$(srcdir)/'`modules/debugger.c
+
 gettextNative_la-gettext-native.lo: modules/gettext-native.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC 
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) 
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) 
$(gettextNative_la_CFLAGS) $(CFLAGS) -MT gettextNative_la-gettext-native.lo -MD 
-MP -MF $(DEPDIR)/gettextNative_la-gettext-native.Tpo -c -o 
gettextNative_la-gettext-native.lo `test -f 'modules/gettext-native.c' || echo 
'$(srcdir)/'`modules/gettext-native.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) 
$(DEPDIR)/gettextNative_la-gettext-native.Tpo 
$(DEPDIR)/gettextNative_la-gettext-native.Plo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/config.h.in new/gjs-0.7.11/config.h.in
--- old/gjs-0.7.10/config.h.in  2011-01-25 23:12:56.000000000 +0100
+++ new/gjs-0.7.11/config.h.in  2011-02-23 04:29:47.000000000 +0100
@@ -28,6 +28,9 @@
 /* Define if we still have JS_GetFunctionName */
 #undef HAVE_JS_GETFUNCTIONNAME
 
+/* Define if we have JS_GetGlobalForScopeChain */
+#undef HAVE_JS_GETGLOBALFORSCOPECHAIN
+
 /* Define if we still have JS_GetStringBytes */
 #undef HAVE_JS_GETSTRINGBYTES
 
@@ -40,9 +43,18 @@
 /* Define if we have JS_NewCompartmentAndGlobalObject */
 #undef HAVE_JS_NEWCOMPARTMENTANDGLOBALOBJECT
 
+/* Define if we have JS_StrictPropertyStub */
+#undef HAVE_JS_STRICTPROPERTYSTUB
+
 /* Define if you have the readline library (-lreadline). */
 #undef HAVE_LIBREADLINE
 
+/* Define to 1 if you have the `mallinfo' function. */
+#undef HAVE_MALLINFO
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
@@ -70,6 +82,9 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define if JSLocaleToUnicode takes a const char* for its src */
+#undef JS_LOCALETOUNICODE_NEEDS_CONST_CHAR
+
 /* Define to the sub-directory in which libtool stores uninstalled libraries.
    */
 #undef LT_OBJDIR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/configure new/gjs-0.7.11/configure
--- old/gjs-0.7.10/configure    2011-01-25 23:12:55.000000000 +0100
+++ new/gjs-0.7.11/configure    2011-02-23 04:29:38.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.10.
+# Generated by GNU Autoconf 2.68 for gjs 0.7.11.
 #
 # 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.10'
-PACKAGE_STRING='gjs 0.7.10'
+PACKAGE_VERSION='0.7.11'
+PACKAGE_STRING='gjs 0.7.11'
 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.10 to adapt to many kinds of systems.
+\`configure' configures gjs 0.7.11 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.10:";;
+     short | recursive ) echo "Configuration of gjs 0.7.11:";;
    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.10
+gjs configure 0.7.11
 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.10, which was
+It was created by gjs $as_me 0.7.11, 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.10'
+ VERSION='0.7.11'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15710,6 +15710,30 @@
 # Checks for libraries.
 
 
+for ac_header in malloc.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" 
"$ac_includes_default"
+if test "x$ac_cv_header_malloc_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MALLOC_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_func in mallinfo
+do :
+  ac_fn_c_check_func "$LINENO" "mallinfo" "ac_cv_func_mallinfo"
+if test "x$ac_cv_func_mallinfo" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MALLINFO 1
+_ACEOF
+
+fi
+done
+
+
 # Look for Spidermonkey. If js-config exists, use that;
 # otherwise we try some pkgconfig files from various distributions.
 
@@ -16048,6 +16072,90 @@
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JS_StrictPropertyStub in 
-lmozjs" >&5
+$as_echo_n "checking for JS_StrictPropertyStub in -lmozjs... " >&6; }
+if ${ac_cv_lib_mozjs_JS_StrictPropertyStub+:} 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_StrictPropertyStub ();
+int
+main ()
+{
+return JS_StrictPropertyStub ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_mozjs_JS_StrictPropertyStub=yes
+else
+  ac_cv_lib_mozjs_JS_StrictPropertyStub=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_StrictPropertyStub" >&5
+$as_echo "$ac_cv_lib_mozjs_JS_StrictPropertyStub" >&6; }
+if test "x$ac_cv_lib_mozjs_JS_StrictPropertyStub" = xyes; then :
+
+$as_echo "#define HAVE_JS_STRICTPROPERTYSTUB 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 
JS_GetGlobalForScopeChain in -lmozjs" >&5
+$as_echo_n "checking for JS_GetGlobalForScopeChain in -lmozjs... " >&6; }
+if ${ac_cv_lib_mozjs_JS_GetGlobalForScopeChain+:} 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_GetGlobalForScopeChain ();
+int
+main ()
+{
+return JS_GetGlobalForScopeChain ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_mozjs_JS_GetGlobalForScopeChain=yes
+else
+  ac_cv_lib_mozjs_JS_GetGlobalForScopeChain=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_GetGlobalForScopeChain" >&5
+$as_echo "$ac_cv_lib_mozjs_JS_GetGlobalForScopeChain" >&6; }
+if test "x$ac_cv_lib_mozjs_JS_GetGlobalForScopeChain" = xyes; then :
+
+$as_echo "#define HAVE_JS_GETGLOBALFORSCOPECHAIN 1" >>confdefs.h
+
+fi
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mozilla-js >= 2 " >&5
 $as_echo_n "checking for mozilla-js >= 2 ... " >&6; }
@@ -16293,6 +16401,41 @@
 fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether JSLocaleToUnicode 
takes a const char*" >&5
+$as_echo_n "checking whether JSLocaleToUnicode takes a const char*... " >&6; }
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $JS_CFLAGS -Wno-unused -Werror"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+            #include <jsapi.h>
+            extern JSBool test_fun (JSContext*, const char*, jsval*);
+
+int
+main ()
+{
+JSLocaleToUnicode jsltu = test_fun;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  have_jslocale_to_unicode_const=yes
+else
+  have_jslocale_to_unicode_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$have_jslocale_to_unicode_const" >&5
+$as_echo "$have_jslocale_to_unicode_const" >&6; }
+CFLAGS="$save_CFLAGS"
+
+if test "$have_jslocale_to_unicode_const" = yes; then
+
+$as_echo "#define JS_LOCALETOUNICODE_NEEDS_CONST_CHAR 1" >>confdefs.h
+
+fi
+
 common_packages="gobject-2.0 >= 2.18.0 $JS_PACKAGE"
 gjs_packages="gmodule-2.0 gthread-2.0 $common_packages"
 gjs_gi_packages="gobject-introspection-1.0 >= 0.10.1 $common_packages"
@@ -17802,7 +17945,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.10, which was
+This file was extended by gjs $as_me 0.7.11, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17868,7 +18011,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.10
+gjs config.status 0.7.11
 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.10/configure.ac new/gjs-0.7.11/configure.ac
--- old/gjs-0.7.10/configure.ac 2011-01-25 23:11:30.000000000 +0100
+++ new/gjs-0.7.11/configure.ac 2011-02-23 04:25:10.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.10],[http://bugzilla.gnome.org/enter_bug.cgi?product=gjs])
+AC_INIT([gjs], [0.7.11],[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])
@@ -82,6 +82,9 @@
 # Checks for libraries.
 m4_define(gobject_required_version, 2.18.0)
 
+AC_CHECK_HEADERS([malloc.h])
+AC_CHECK_FUNCS(mallinfo)
+
 # Look for Spidermonkey. If js-config exists, use that;
 # otherwise we try some pkgconfig files from various distributions.
 
@@ -149,6 +152,8 @@
 AC_CHECK_LIB([mozjs], [JS_GetStringBytes], AC_DEFINE([HAVE_JS_GETSTRINGBYTES], 
[1], [Define if we still have JS_GetStringBytes]),, [$JS_LIBS])
 AC_CHECK_LIB([mozjs], [JS_GetFunctionName], 
AC_DEFINE([HAVE_JS_GETFUNCTIONNAME], [1], [Define if we still have 
JS_GetFunctionName]),, [$JS_LIBS])
 AC_CHECK_LIB([mozjs], [JS_GetStringChars], AC_DEFINE([HAVE_JS_GETSTRINGCHARS], 
[1], [Define if we still have JS_GetStringChars]),, [$JS_LIBS])
+AC_CHECK_LIB([mozjs], [JS_StrictPropertyStub], 
AC_DEFINE([HAVE_JS_STRICTPROPERTYSTUB], [1], [Define if we have 
JS_StrictPropertyStub]),, [$JS_LIBS])
+AC_CHECK_LIB([mozjs], [JS_GetGlobalForScopeChain], 
AC_DEFINE([HAVE_JS_GETGLOBALFORSCOPECHAIN], [1], [Define if we have 
JS_GetGlobalForScopeChain]),, [$JS_LIBS])
 
 AC_MSG_CHECKING([for mozilla-js >= 2 ])
 if `$PKG_CONFIG --exists $JS_PACKAGE '>=' 2`; then
@@ -160,7 +165,7 @@
               , [$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_CHECK_LIB([mozjs], [JS_NewCompartmentAndGlobalObject],
               AC_DEFINE([HAVE_JS_NEWCOMPARTMENTANDGLOBALOBJECT], [1], [Define 
if we have JS_NewCompartmentAndGlobalObject]),
               , [$JS_LIBS])
 
@@ -197,6 +202,26 @@
 fi
 AC_SUBST([JS_EXTRA_CFLAGS])
 
+AC_MSG_CHECKING([whether JSLocaleToUnicode takes a const char*])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $JS_CFLAGS -Wno-unused -Werror"
+AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM(
+        [[
+            #include <jsapi.h>
+            extern JSBool test_fun (JSContext*, const char*, jsval*);
+        ]],
+        [[JSLocaleToUnicode jsltu = test_fun;]]
+    )],
+    [have_jslocale_to_unicode_const=yes],
+    [have_jslocale_to_unicode_const=no])
+AC_MSG_RESULT([$have_jslocale_to_unicode_const])
+CFLAGS="$save_CFLAGS"
+
+if test "$have_jslocale_to_unicode_const" = yes; then
+     AC_DEFINE([JS_LOCALETOUNICODE_NEEDS_CONST_CHAR], [1], [Define if 
JSLocaleToUnicode takes a const char* for its src])
+fi
+
 common_packages="gobject-2.0 >= gobject_required_version $JS_PACKAGE"
 gjs_packages="gmodule-2.0 gthread-2.0 $common_packages"
 gjs_gi_packages="gobject-introspection-1.0 >= 0.10.1 $common_packages"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gi/boxed.c new/gjs-0.7.11/gi/boxed.c
--- old/gjs-0.7.10/gi/boxed.c   2010-12-04 00:04:20.000000000 +0100
+++ new/gjs-0.7.11/gi/boxed.c   2011-02-23 04:25:10.000000000 +0100
@@ -490,6 +490,7 @@
                 GType gtype = g_registered_type_info_get_g_type( 
(GIRegisteredTypeInfo*) priv->info);
                 if (gtype != G_TYPE_NONE) {
                     priv->gboxed = g_boxed_copy(gtype, source_priv->gboxed);
+                    gjs_maybe_gc(context);
                     GJS_NATIVE_CONSTRUCTOR_FINISH(boxed);
                     return JS_TRUE;
                 }
@@ -544,6 +545,7 @@
             }
 
             unthreadsafe_template_for_constructor.gboxed = NULL;
+            gjs_maybe_gc(context);
 
             retval = priv->gboxed != NULL;
             if (retval)
@@ -552,6 +554,8 @@
         }
     }
 
+    gjs_maybe_gc(context);
+
     GJS_NATIVE_CONSTRUCTOR_FINISH(boxed);
 
     return JS_TRUE;
@@ -847,6 +851,9 @@
 boxed_field_setter (JSContext *context,
                     JSObject  *obj,
                     jsid       id,
+#ifdef HAVE_JS_STRICTPROPERTYSTUB
+                    JSBool     strict,
+#endif
                     jsval     *value)
 {
     Boxed *priv;
@@ -955,7 +962,7 @@
     JS_PropertyStub,
     JS_PropertyStub,
     JS_PropertyStub,
-    JS_PropertyStub,
+    JS_StrictPropertyStub,
     JS_EnumerateStub,
     (JSResolveOp) boxed_new_resolve, /* needs cast since it's the new resolve 
signature */
     JS_ConvertStub,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gi/enumeration.c 
new/gjs-0.7.11/gi/enumeration.c
--- old/gjs-0.7.10/gi/enumeration.c     2011-01-14 21:34:45.000000000 +0100
+++ new/gjs-0.7.11/gi/enumeration.c     2011-02-08 22:56:08.000000000 +0100
@@ -91,8 +91,8 @@
                            fixed_name, value_js,
                            NULL, NULL,
                            GJS_MODULE_PROP_FLAGS)) {
-        gjs_throw(context, "Unable to define enumeration value %s %d (no 
memory most likely)",
-                     fixed_name, value_val);
+        gjs_throw(context, "Unable to define enumeration value %s %" 
G_GINT64_FORMAT " (no memory most likely)",
+                  fixed_name, value_val);
         g_free(fixed_name);
         return JS_FALSE;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gi/function.c new/gjs-0.7.11/gi/function.c
--- old/gjs-0.7.10/gi/function.c        2010-12-04 00:04:20.000000000 +0100
+++ new/gjs-0.7.11/gi/function.c        2011-02-23 04:25:10.000000000 +0100
@@ -974,7 +974,7 @@
     JS_PropertyStub,
     JS_PropertyStub,
     JS_PropertyStub,
-    JS_PropertyStub,
+    JS_StrictPropertyStub,
     JS_EnumerateStub,
     (JSResolveOp) function_new_resolve, /* needs cast since it's the new 
resolve signature */
     JS_ConvertStub,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gi/keep-alive.c 
new/gjs-0.7.11/gi/keep-alive.c
--- old/gjs-0.7.10/gi/keep-alive.c      2010-11-16 00:44:17.000000000 +0100
+++ new/gjs-0.7.11/gi/keep-alive.c      2011-02-23 04:25:10.000000000 +0100
@@ -187,7 +187,7 @@
     JS_PropertyStub,
     JS_PropertyStub,
     JS_PropertyStub,
-    JS_PropertyStub,
+    JS_StrictPropertyStub,
     JS_EnumerateStub,
     JS_ResolveStub,
     JS_ConvertStub,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gi/ns.c new/gjs-0.7.11/gi/ns.c
--- old/gjs-0.7.10/gi/ns.c      2010-12-04 00:04:20.000000000 +0100
+++ new/gjs-0.7.11/gi/ns.c      2011-02-23 04:25:10.000000000 +0100
@@ -213,7 +213,7 @@
     JS_PropertyStub,
     JS_PropertyStub,
     JS_PropertyStub,
-    JS_PropertyStub,
+    JS_StrictPropertyStub,
     JS_EnumerateStub,
     (JSResolveOp) ns_new_resolve, /* needs cast since it's the new resolve 
signature */
     JS_ConvertStub,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gi/object.c new/gjs-0.7.11/gi/object.c
--- old/gjs-0.7.10/gi/object.c  2010-12-10 20:33:02.000000000 +0100
+++ new/gjs-0.7.11/gi/object.c  2011-02-23 04:25:10.000000000 +0100
@@ -184,6 +184,9 @@
 object_instance_set_prop(JSContext *context,
                          JSObject  *obj,
                          jsid       id,
+#ifdef HAVE_JS_STRICTPROPERTYSTUB
+                         JSBool     strict,
+#endif
                          jsval     *value_p)
 {
     ObjectInstance *priv;
@@ -768,6 +771,8 @@
 
     GJS_NATIVE_CONSTRUCTOR_FINISH(object_instance);
 
+    gjs_maybe_gc(context);
+
     return JS_TRUE;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gi/param.c new/gjs-0.7.11/gi/param.c
--- old/gjs-0.7.10/gi/param.c   2010-12-04 00:04:20.000000000 +0100
+++ new/gjs-0.7.11/gi/param.c   2011-02-23 04:25:10.000000000 +0100
@@ -259,7 +259,7 @@
     JS_PropertyStub,
     JS_PropertyStub,
     param_get_prop,
-    JS_PropertyStub,
+    JS_StrictPropertyStub,
     JS_EnumerateStub,
     (JSResolveOp) param_new_resolve, /* needs cast since it's the new resolve 
signature */
     JS_ConvertStub,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gi/repo.c new/gjs-0.7.11/gi/repo.c
--- old/gjs-0.7.10/gi/repo.c    2010-12-04 00:04:20.000000000 +0100
+++ new/gjs-0.7.11/gi/repo.c    2011-02-23 04:25:10.000000000 +0100
@@ -222,7 +222,7 @@
     JS_PropertyStub,
     JS_PropertyStub,
     JS_PropertyStub,
-    JS_PropertyStub,
+    JS_StrictPropertyStub,
     JS_EnumerateStub,
     (JSResolveOp) repo_new_resolve, /* needs cast since it's the new resolve 
signature */
     JS_ConvertStub,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gi/union.c new/gjs-0.7.11/gi/union.c
--- old/gjs-0.7.10/gi/union.c   2010-12-04 00:04:20.000000000 +0100
+++ new/gjs-0.7.11/gi/union.c   2011-02-23 04:25:10.000000000 +0100
@@ -355,7 +355,7 @@
     JS_PropertyStub,
     JS_PropertyStub,
     JS_PropertyStub,
-    JS_PropertyStub,
+    JS_StrictPropertyStub,
     JS_EnumerateStub,
     (JSResolveOp) union_new_resolve, /* needs cast since it's the new resolve 
signature */
     JS_ConvertStub,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gjs/byteArray.c 
new/gjs-0.7.11/gjs/byteArray.c
--- old/gjs-0.7.10/gjs/byteArray.c      2011-01-10 19:38:42.000000000 +0100
+++ new/gjs-0.7.11/gjs/byteArray.c      2011-02-23 04:25:10.000000000 +0100
@@ -45,6 +45,9 @@
 static JSBool byte_array_set_prop      (JSContext    *context,
                                         JSObject     *obj,
                                         jsid          id,
+#ifdef HAVE_JS_STRICTPROPERTYSTUB
+                                        JSBool        strict,
+#endif
                                         jsval        *value_p);
 static JSBool byte_array_new_resolve   (JSContext    *context,
                                         JSObject     *obj,
@@ -237,6 +240,9 @@
 byte_array_length_setter(JSContext *context,
                          JSObject  *obj,
                          jsid       id,
+#ifdef HAVE_JS_STRICTPROPERTYSTUB
+                         JSBool     strict,
+#endif
                          jsval     *value_p)
 {
     ByteArrayInstance *priv;
@@ -296,6 +302,9 @@
 byte_array_set_prop(JSContext *context,
                     JSObject  *obj,
                     jsid       id,
+#ifdef HAVE_JS_STRICTPROPERTYSTUB
+                    JSBool     strict,
+#endif
                     jsval     *value_p)
 {
     ByteArrayInstance *priv;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gjs/compat.h new/gjs-0.7.11/gjs/compat.h
--- old/gjs-0.7.10/gjs/compat.h 2010-11-16 00:44:17.000000000 +0100
+++ new/gjs-0.7.11/gjs/compat.h 2011-02-23 04:25:10.000000000 +0100
@@ -135,6 +135,14 @@
 
 #endif
 
+#ifndef HAVE_JS_STRICTPROPERTYSTUB
+#define JS_StrictPropertyStub JS_PropertyStub
+#endif
+
+#ifndef HAVE_JS_GETGLOBALFORSCOPECHAIN
+#define JS_GetGlobalForScopeChain JS_GetScopeChain
+#endif
+
 G_END_DECLS
 
 #endif  /* __GJS_COMPAT_H__ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gjs/context.c new/gjs-0.7.11/gjs/context.c
--- old/gjs-0.7.10/gjs/context.c        2010-12-21 03:01:57.000000000 +0100
+++ new/gjs-0.7.11/gjs/context.c        2011-02-23 04:25:10.000000000 +0100
@@ -483,9 +483,13 @@
 }
 
 static JSBool
-gjs_locale_to_unicode (JSContext *context,
-                       char      *src,
-                       jsval     *retval)
+gjs_locale_to_unicode (JSContext  *context,
+#ifdef JS_LOCALETOUNICODE_NEEDS_CONST_CHAR
+                       const char *src,
+#else
+                       char       *src,
+#endif
+                       jsval      *retval)
 {
     JSBool success;
     char *utf8;
@@ -825,6 +829,33 @@
 }
 
 /**
+ * gjs_context_maybe_gc:
+ * @context: a #GjsContext
+ * 
+ * Similar to the Spidermonkey JS_MaybeGC() call which
+ * heuristically looks at JS runtime memory usage and
+ * may initiate a garbage collection. 
+ *
+ * This function always unconditionally invokes JS_MaybeGC(), but
+ * additionally looks at memory usage from the system malloc()
+ * when available, and if the delta has grown since the last run
+ * significantly, also initiates a full JavaScript garbage
+ * collection.  The idea is that since GJS is a bridge between
+ * JavaScript and system libraries, and JS objects act as proxies
+ * for these system memory objects, GJS consumers need a way to
+ * hint to the runtime that it may be a good idea to try a
+ * collection.
+ *
+ * A good time to call this function is when your application
+ * transitions to an idle state.
+ */ 
+void
+gjs_context_maybe_gc (GjsContext  *context)
+{
+    gjs_maybe_gc(context->context);
+}
+
+/**
  * gjs_context_get_all:
  *
  * Returns a newly-allocated list containing all known instances of 
#GjsContext.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gjs/context.h new/gjs-0.7.11/gjs/context.h
--- old/gjs-0.7.10/gjs/context.h        2010-12-10 20:33:02.000000000 +0100
+++ new/gjs-0.7.11/gjs/context.h        2011-02-08 22:56:08.000000000 +0100
@@ -73,6 +73,8 @@
 
 void            gjs_context_print_stack_stderr    (GjsContext *js_context);
 
+void            gjs_context_maybe_gc              (GjsContext  *context);
+
 void            gjs_dumpstack                     (void);
 
 G_END_DECLS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gjs/importer.c 
new/gjs-0.7.11/gjs/importer.c
--- old/gjs-0.7.10/gjs/importer.c       2010-12-10 20:33:02.000000000 +0100
+++ new/gjs-0.7.11/gjs/importer.c       2011-02-23 04:25:10.000000000 +0100
@@ -1021,7 +1021,7 @@
     JS_PropertyStub,
     JS_PropertyStub,
     JS_PropertyStub,
-    JS_PropertyStub,
+    JS_StrictPropertyStub,
     (JSEnumerateOp) importer_new_enumerate, /* needs cast since it's the new 
enumerate signature */
     (JSResolveOp) importer_new_resolve, /* needs cast since it's the new 
resolve signature */
     JS_ConvertStub,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gjs/jsapi-util.c 
new/gjs-0.7.11/gjs/jsapi-util.c
--- old/gjs-0.7.10/gjs/jsapi-util.c     2011-01-17 17:14:12.000000000 +0100
+++ new/gjs-0.7.11/gjs/jsapi-util.c     2011-02-23 04:25:10.000000000 +0100
@@ -33,6 +33,10 @@
 #include "jsapi-private.h"
 
 #include <string.h>
+#include <math.h>
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
 
 GQuark
 gjs_util_error_quark (void)
@@ -236,7 +240,7 @@
 
 static JSClass global_class = {
     "GjsGlobal", JSCLASS_GLOBAL_FLAGS,
-    JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,
+    JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
     JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,
     JSCLASS_NO_OPTIONAL_MEMBERS
 };
@@ -811,6 +815,8 @@
         bytes = g_malloc((len + 1) * sizeof(char));
         JS_EncodeStringToBuffer(str, bytes, len);
         bytes[len] = '\0';
+    } else {
+        bytes = g_strdup("[invalid string]");
     }
 #endif
     JS_EndRequest(context);
@@ -908,7 +914,7 @@
               global, debugstr);
     g_free(debugstr);
 
-    parent = JS_GetScopeChain(context);
+    parent = JS_GetGlobalForScopeChain(context);
     chain = g_string_new(NULL);
     while (parent != NULL) {
         char *debug;
@@ -1516,3 +1522,41 @@
     JS_EndRequest(context);
     return JS_FALSE;
 }
+
+/**
+ * gjs_maybe_gc:
+ *
+ * Low level version of gjs_context_maybe_gc().
+ */
+void
+gjs_maybe_gc (JSContext *context)
+{
+    /* Picked this number out of the air basically; 16 megabytes
+     * "feels" good for all of mobile/embedded/GP.  We don't
+     * expect the cost of JS_GC() to be too high, but we
+     * also don't want to call it too often.
+     *
+     * A better approach actually may be to dynamically watch "free";
+     * how much memory we're using before we hit swap.  Even better of
+     * course: some component of the OS sends us a signal when we
+     * should be trying a GC.
+     */
+#define _GJS_MAYBE_GC_MALLOC_BYTES (16 * 1024 * 1024)
+
+    static int _gjs_last_maybe_gc_malloc_blocks = -1;
+    
+    JS_MaybeGC(context);
+
+#ifdef HAVE_MALLINFO
+    {
+        struct mallinfo mstats;
+        mstats = mallinfo();
+        if (mstats.uordblks < _gjs_last_maybe_gc_malloc_blocks || 
_gjs_last_maybe_gc_malloc_blocks == -1) {
+            _gjs_last_maybe_gc_malloc_blocks = mstats.uordblks;
+        } else if ((mstats.uordblks - _gjs_last_maybe_gc_malloc_blocks) > 
_GJS_MAYBE_GC_MALLOC_BYTES) {
+            JS_GC(context);
+            _gjs_last_maybe_gc_malloc_blocks = mstats.uordblks;
+        }
+    }     
+#endif    
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gjs/jsapi-util.h 
new/gjs-0.7.11/gjs/jsapi-util.h
--- old/gjs-0.7.10/gjs/jsapi-util.h     2011-01-14 21:34:45.000000000 +0100
+++ new/gjs-0.7.11/gjs/jsapi-util.h     2011-02-23 04:25:10.000000000 +0100
@@ -148,7 +148,7 @@
     JS_PropertyStub, \
     JS_PropertyStub, \
     JS_PropertyStub, \
-    JS_PropertyStub,\
+    JS_StrictPropertyStub, \
     JS_EnumerateStub,\
     (JSResolveOp) gjs_##cname##_new_resolve, \
     JS_ConvertStub, \
@@ -386,6 +386,8 @@
                                                char           **utf8_string_p,
                                                GError         **error);
 
+void gjs_maybe_gc (JSContext *context);
+
 G_END_DECLS
 
 #endif  /* __GJS_JSAPI_UTIL_H__ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gjs/native.c new/gjs-0.7.11/gjs/native.c
--- old/gjs-0.7.10/gjs/native.c 2010-12-10 20:33:02.000000000 +0100
+++ new/gjs-0.7.11/gjs/native.c 2011-02-23 04:25:10.000000000 +0100
@@ -118,6 +118,7 @@
 
         name = get_module_name(context, parent, &tmp);
         if (name != NULL) {
+            g_string_prepend_c(module_id, '.');
             g_string_prepend(module_id, name);
         }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/gjs/stack.c new/gjs-0.7.11/gjs/stack.c
--- old/gjs-0.7.10/gjs/stack.c  2010-12-21 03:01:57.000000000 +0100
+++ new/gjs-0.7.11/gjs/stack.c  2011-02-08 22:56:08.000000000 +0100
@@ -157,8 +157,8 @@
         g_string_append_printf(buf, "%d <TOP LEVEL>", num);
 
     for (i = 0; i < call_props.length; i++) {
-        char *name;
-        char *value;
+        char *name = NULL;
+        char *value = NULL;
         JSPropertyDesc* desc = &call_props.array[i];
         if(desc->flags & JSPD_ARGUMENT) {
             name = jsvalue_to_string(cx, desc->id, &is_string);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/modules/dbus-exports.c 
new/gjs-0.7.11/modules/dbus-exports.c
--- old/gjs-0.7.10/modules/dbus-exports.c       2010-12-10 20:33:02.000000000 
+0100
+++ new/gjs-0.7.11/modules/dbus-exports.c       2011-02-23 04:25:10.000000000 
+0100
@@ -1803,7 +1803,7 @@
     JS_PropertyStub,
     JS_PropertyStub,
     JS_PropertyStub,
-    JS_PropertyStub,
+    JS_StrictPropertyStub,
     JS_EnumerateStub,
     (JSResolveOp) exports_new_resolve, /* needs cast since it's the new 
resolve signature */
     JS_ConvertStub,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/modules/dbus.c 
new/gjs-0.7.11/modules/dbus.c
--- old/gjs-0.7.10/modules/dbus.c       2010-12-10 20:33:02.000000000 +0100
+++ new/gjs-0.7.11/modules/dbus.c       2011-02-23 04:25:10.000000000 +0100
@@ -1145,6 +1145,8 @@
         g_closure_unref(owner->acquired_closure);
         g_closure_unref(owner->lost_closure);
 
+        g_free(owner->funcs.name);
+
         g_slice_free(GjsJSDBusNameOwner, owner);
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/modules/debugger.c 
new/gjs-0.7.11/modules/debugger.c
--- old/gjs-0.7.10/modules/debugger.c   1970-01-01 01:00:00.000000000 +0100
+++ new/gjs-0.7.11/modules/debugger.c   2011-02-23 04:25:10.000000000 +0100
@@ -0,0 +1,55 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2011  litl, LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include <string.h>
+
+#include <jsapi.h>
+
+#include <glib.h>
+#include <gjs/gjs-module.h>
+
+#include "debugger.h"
+
+static JSBool
+gjs_debugger_native_trap(JSContext *cx, JSObject *obj, uintN argc,
+                         jsval *argv, jsval *retval)
+{
+    G_BREAKPOINT();
+
+    return JS_TRUE;
+}
+
+JSBool
+gjs_define_debugger_stuff(JSContext *context,
+                          JSObject  *module_obj)
+{
+    if (!JS_DefineFunction(context, module_obj,
+                           "nativeTrap",
+                           gjs_debugger_native_trap,
+                           1, GJS_MODULE_PROP_FLAGS))
+        return JS_FALSE;
+
+    return JS_TRUE;
+}
+
+GJS_REGISTER_NATIVE_MODULE("debugger", gjs_define_debugger_stuff);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gjs-0.7.10/modules/debugger.h 
new/gjs-0.7.11/modules/debugger.h
--- old/gjs-0.7.10/modules/debugger.h   1970-01-01 01:00:00.000000000 +0100
+++ new/gjs-0.7.11/modules/debugger.h   2011-02-23 04:25:10.000000000 +0100
@@ -0,0 +1,39 @@
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (c) 2008  litl, LLC
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __GJS_DEBUGGER_H__
+#define __GJS_DEBUGGER_H__
+
+#include <config.h>
+#include <glib.h>
+
+#include <jsapi.h>
+
+G_BEGIN_DECLS
+
+JSBool        gjs_define_debugger_stuff    (JSContext      *context,
+                                            JSObject       *in_object);
+
+G_END_DECLS
+
+#endif  /* __GJS_DEBUGGER_H__ */


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



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to