[gjs/wip/xulrunner-1.9.3-rebase6: 8/8] Cast users of JS_EnterLocalRootScope
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/xulrunner-1.9.3-rebase6: 8/8] Cast users of JS_EnterLocalRootScope
- Date: Thu, 23 Sep 2010 20:45:00 +0000 (UTC)
commit 9059a9c4dcd285f21f8e7a1c68143ca30dd6d1a6
Author: Colin Walters <walters verbum org>
Date: Thu Sep 23 16:24:16 2010 -0400
Cast users of JS_EnterLocalRootScope
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.
gjs/context.c | 2 +-
gjs/jsapi-util-error.c | 2 +-
gjs/jsapi-util.c | 4 ++--
gjs/stack.c | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gjs/context.c b/gjs/context.c
index cfd5a61..52086a8 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 b59e182..cb0d507 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 dc8fb5a..1408276 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 5a7a3a2..5ae3b02 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]