[gjs] xul nightly: conditionnally adapt to JS_SetScriptStackQuota removal



commit be65fd94bafa874f11c58123cdabd5c26790041d
Author: Marc-Antoine Perennou <Marc-Antoine Perennou com>
Date:   Tue Jun 7 14:19:30 2011 +0200

    xul nightly: conditionnally adapt to JS_SetScriptStackQuota removal
    
    In https://hg.mozilla.org/mozilla-central/rev/707cefa34478
    upstream removed JS_SetSciptStackQuota
    Don't try to use it if it's not available
    
    https://bugzilla.gnome.org/show_bug.cgi?id=652041
    
    Signed-off-by: Marc-Antoine Perennou <Marc-Antoine Perennou com>

 configure.ac  |    1 +
 gjs/context.c |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 85c5078..1dbbeb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,6 +155,7 @@ AC_CHECK_FUNC([JS_FreezeObject], AC_DEFINE([HAVE_JS_FREEZEOBJECT], [1], [Define
 AC_CHECK_FUNC([JS_IsScriptFrame], AC_DEFINE([HAVE_JS_ISSCRIPTFRAME], [1], [Define if we have JS_IsScriptFrame]),)
 AC_CHECK_FUNC([JS_EndPC], AC_DEFINE([HAVE_JS_ENDPC], [1], [Define if we have JS_EndPC]),)
 AC_CHECK_FUNC([JS_NewCompartmentAndGlobalObject], AC_DEFINE([HAVE_JS_NEWCOMPARTMENTANDGLOBALOBJECT], [1], [Define if we have JS_NewCompartmentAndGlobalObject]),)
+AC_CHECK_FUNC([JS_SetScriptStackQuota], AC_DEFINE([HAVE_JS_SETSCRIPTSTACKQUOTA], [1], [Define if we have JS_SetScriptStackQuota]),)
 CFLAGS=$saved_CFLAGS
 LIBS=$saved_LIBS
 
diff --git a/gjs/context.c b/gjs/context.c
index 75b00e8..d810d50 100644
--- a/gjs/context.c
+++ b/gjs/context.c
@@ -549,9 +549,11 @@ gjs_context_constructor (GType                  type,
 
     JS_BeginRequest(js_context->context);
 
+#ifdef HAVE_JS_SETSCRIPTSTACKQUOTA
     /* same as firefox, see discussion at
      * https://bugzilla.mozilla.org/show_bug.cgi?id=420869 */
     JS_SetScriptStackQuota(js_context->context, 100*1024*1024);
+#endif
 
     /* JSOPTION_DONT_REPORT_UNCAUGHT: Don't send exceptions to our
      * error report handler; instead leave them set.  This allows us



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]