diff options
author | Colin Walters <walters@verbum.org> | 2010-09-23 16:24:16 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-09-23 16:32:35 -0400 |
commit | 9059a9c4dcd285f21f8e7a1c68143ca30dd6d1a6 (patch) | |
tree | 4067cdbf83269d9404331fc522b3eedecc0166f0 | |
parent | befa94438f269ce48dcf1f0d1264005bf3391084 (diff) | |
download | gjs-wip/xulrunner-1.9.3-rebase6.tar.gz |
Cast users of JS_EnterLocalRootScopewip/xulrunner-1.9.3-rebase6
In Xulrunner 1.9.3, this is now a no-op. See
upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=519949
Now in theory, we should be checking the return value and handling
that. I wrote a nontrivial patch to do this, but decided it
wasn't worth it, since in newer xulrunners it's just pointless
code spaghetti, and in older, it's not like we're really
going to go OOM in reality.
-rw-r--r-- | gjs/context.c | 2 | ||||
-rw-r--r-- | gjs/jsapi-util-error.c | 2 | ||||
-rw-r--r-- | gjs/jsapi-util.c | 4 | ||||
-rw-r--r-- | gjs/stack.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/gjs/context.c b/gjs/context.c index cfd5a61a..52086a87 100644 --- a/gjs/context.c +++ b/gjs/context.c @@ -194,7 +194,7 @@ gjs_print_parse_args(JSContext *context, JS_BeginRequest(context); str = g_string_new(""); - JS_EnterLocalRootScope(context); + (void)JS_EnterLocalRootScope(context); for (n = 0; n < argc; ++n) { JSExceptionState *exc_state; JSString *jstr; diff --git a/gjs/jsapi-util-error.c b/gjs/jsapi-util-error.c index b59e1821..cb0d507a 100644 --- a/gjs/jsapi-util-error.c +++ b/gjs/jsapi-util-error.c @@ -77,7 +77,7 @@ gjs_throw_valist(JSContext *context, result = JS_FALSE; - JS_EnterLocalRootScope(context); + (void)JS_EnterLocalRootScope(context); if (!gjs_string_from_utf8(context, s, -1, &argv[0])) { JS_ReportError(context, "Failed to copy exception string"); diff --git a/gjs/jsapi-util.c b/gjs/jsapi-util.c index dc8fb5a6..14082760 100644 --- a/gjs/jsapi-util.c +++ b/gjs/jsapi-util.c @@ -579,7 +579,7 @@ gjs_log_object_props(JSContext *context, * that could get collected as we go through this process. So * create a local root scope. */ - JS_EnterLocalRootScope(context); + (void)JS_EnterLocalRootScope(context); props_iter = JS_NewPropertyIterator(context, obj); if (props_iter == NULL) { @@ -632,7 +632,7 @@ gjs_explain_scope(JSContext *context, JS_BeginRequest(context); - JS_EnterLocalRootScope(context); + (void)JS_EnterLocalRootScope(context); gjs_debug(GJS_DEBUG_SCOPE, " Context: %p", context); diff --git a/gjs/stack.c b/gjs/stack.c index 5a7a3a2e..5ae3b029 100644 --- a/gjs/stack.c +++ b/gjs/stack.c @@ -53,7 +53,7 @@ jsvalue_to_string(JSContext* cx, jsval val, gboolean* is_string) const char* value = NULL; JSString* value_str; - JS_EnterLocalRootScope(cx); + (void)JS_EnterLocalRootScope(cx); value_str = JS_ValueToString(cx, val); if (value_str) @@ -91,7 +91,7 @@ format_frame(JSContext* cx, JSStackFrame* fp, gboolean is_string; jsval val; - JS_EnterLocalRootScope(cx); + (void)JS_EnterLocalRootScope(cx); if (JS_IsNativeFrame(cx, fp)) { g_string_append_printf(buf, "%d [native frame]\n", num); |