[gjs/mozjs102: 44/62] object: Add constructor argument
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/mozjs102: 44/62] object: Add constructor argument
- Date: Sun, 7 Aug 2022 17:53:00 +0000 (UTC)
commit 334e9f6469dcaa8e3ec84ee97188d843f1a9e62e
Author: Evan Welsh <contact evanwelsh com>
Date: Fri Jul 22 12:15:58 2022 -0700
object: Add constructor argument
mozjs91 had a convenience constructor for Rooted that would also construct
the template type if its constructor had a single JSContext* argument.
This constructor will be removed in mozjs102, so we have to pass the
JSContext twice here.
gi/object.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index fc2e25ebc..5bf88aa28 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1194,7 +1194,7 @@ bool ObjectPrototype::props_to_g_parameters(JSContext* context,
size_t ix, length;
JS::RootedId prop_id(context);
JS::RootedValue value(context);
- JS::Rooted<JS::IdVector> ids(context);
+ JS::Rooted<JS::IdVector> ids(context, context);
std::unordered_set<GParamSpec*> visited_params;
if (!JS_Enumerate(context, props, &ids)) {
gjs_throw(context, "Failed to create property iterator for object props hash");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]