summaryrefslogtreecommitdiff
path: root/gjs/jsapi-util.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-09-17 11:58:43 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2010-09-30 10:47:38 -0400
commit0d81ec48c99412fbac9a2b77ae85409367698670 (patch)
treedac09ec7413839738db85447ab9e901cc5b7aab8 /gjs/jsapi-util.h
parent52084e1821d7120c1af2de627bf146758d0aacfd (diff)
downloadgjs-0d81ec48c99412fbac9a2b77ae85409367698670.tar.gz
xulrunner 1.9.3: Use JS_NewGlobalObject if available
In 1.9.3, we need to explicitly say when we're making the global object. Clean this up by introducing a wrapper function; while we're at it, also call JS_InitStandardClasses here since everything else creating a global did too. Note that rooting the global object is not necessary, so remove that. From a grep of the sources (going back to at least 1.9.2): ./src/jsgc.cpp: if (acx->globalObject && !JS_HAS_OPTION(acx, JSOPTION_UNROOTED_GLOBAL)) ./src/jsgc.cpp: JS_CALL_OBJECT_TRACER(trc, acx->globalObject, "global object");
Diffstat (limited to 'gjs/jsapi-util.h')
-rw-r--r--gjs/jsapi-util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 39b782af..78a0ca70 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -194,6 +194,7 @@ jsval cname##_create_proto(JSContext *context, JSObject *module, const char *pro
return rval; \
}
+gboolean gjs_init_context_standard (JSContext *context);
void* gjs_runtime_get_data (JSRuntime *runtime,
const char *name);