[gjs: 6/11] arg: Use HandleValue in gjs_array_to_array()
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 6/11] arg: Use HandleValue in gjs_array_to_array()
- Date: Wed, 30 Oct 2019 17:16:10 +0000 (UTC)
commit 6fd9b52078a501c606e2c94943960c527add875d
Author: Philip Chimento <philip chimento gmail com>
Date: Sat Oct 26 15:36:37 2019 -0700
arg: Use HandleValue in gjs_array_to_array()
This function may cause a garbage collection, so its input should be
rooted to protect it from being garbage collected.
gi/arg.cpp | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/gi/arg.cpp b/gi/arg.cpp
index 1b2be888..3d47cc54 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -1052,14 +1052,9 @@ is_gvalue_flat_array(GITypeInfo *param_info,
}
GJS_JSAPI_RETURN_CONVENTION
-static bool
-gjs_array_to_array(JSContext *context,
- JS::Value array_value,
- gsize length,
- GITransfer transfer,
- GITypeInfo *param_info,
- void **arr_p)
-{
+static bool gjs_array_to_array(JSContext* context, JS::HandleValue array_value,
+ size_t length, GITransfer transfer,
+ GITypeInfo* param_info, void** arr_p) {
enum { UNSIGNED=false, SIGNED=true };
GITypeTag element_type;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]