[gjs/wip/xulrunner-1.9.3-rebase7: 7/13] Cast users of JS_EnterLocalRootScope
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/xulrunner-1.9.3-rebase7: 7/13] Cast users of JS_EnterLocalRootScope
- Date: Tue, 28 Sep 2010 22:24:06 +0000 (UTC)
commit b18a44c48b61e4df86d8b6229b8262e94406d069
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 3efda19..ad907e6 100644
--- a/gjs/context.c
+++ b/gjs/context.c
@@ -200,7 +200,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 a2a7420..8599646 100644
--- a/gjs/jsapi-util.c
+++ b/gjs/jsapi-util.c
@@ -722,7 +722,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) {
@@ -782,7 +782,7 @@ gjs_explain_scope(JSContext *context,
JS_BeginRequest(load_context);
JS_BeginRequest(call_context);
- JS_EnterLocalRootScope(context);
+ (void)JS_EnterLocalRootScope(context);
gjs_debug(GJS_DEBUG_SCOPE,
" Context: %p %s",
diff --git a/gjs/stack.c b/gjs/stack.c
index 5788a47..1254f92 100644
--- a/gjs/stack.c
+++ b/gjs/stack.c
@@ -54,7 +54,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)
@@ -92,7 +92,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]