[gjs] arg: Update rooting to match mozjs31
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] arg: Update rooting to match mozjs31
- Date: Thu, 3 Nov 2016 01:19:02 +0000 (UTC)
commit c82cf4da037a25d9ffcb895ff064d762ebfc973b
Author: Philip Chimento <philip endlessm com>
Date: Wed Nov 2 15:32:35 2016 -0700
arg: Update rooting to match mozjs31
I forgot one extra root in the earlier commit.
https://bugzilla.gnome.org/show_bug.cgi?id=773763
gi/arg.cpp | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gi/arg.cpp b/gi/arg.cpp
index f6d8d13..1ad0dd9 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -506,18 +506,20 @@ gjs_object_to_g_hash(JSContext *context,
result = create_hash_table_for_key_type(key_param_info);
JS::RootedValue key_js(context), val_js(context);
- for (id_ix = 0, id_len = ids.length(); id_ix < id_len; id_ix++) {
+ JS::RootedId cur_id(context);
+ for (id_ix = 0, id_len = ids.length(); id_ix < id_len; ++id_ix) {
+ cur_id = ids[id_ix];
gpointer key_ptr, val_ptr;
GIArgument val_arg = { 0 };
- if (!JS_IdToValue(context, ids[id_ix], key_js.address()))
+ if (!JS_IdToValue(context, cur_id, key_js.address()))
goto free_hash_and_fail;
/* Type check key type. */
if (!value_to_ghashtable_key(context, key_js, key_param_info, &key_ptr))
goto free_hash_and_fail;
- if (!JS_GetPropertyById(context, props, ids[id_ix], val_js.address()))
+ if (!JS_GetPropertyById(context, props, cur_id, val_js.address()))
goto free_hash_and_fail;
/* Type check and convert value to a c type */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]