[gjs/wip/ptomato/mozjs52: 24/33] js: Add JSCLASS_FOREGROUND_FINALIZE flag
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs52: 24/33] js: Add JSCLASS_FOREGROUND_FINALIZE flag
- Date: Sun, 11 Jun 2017 05:39:45 +0000 (UTC)
commit 9a410dfb8b85355008b046453ce2ec4e59111e07
Author: Philip Chimento <philip chimento gmail com>
Date: Mon May 1 22:49:24 2017 -0700
js: Add JSCLASS_FOREGROUND_FINALIZE flag
For all classes with a finalize hook, SpiderMonkey 52 requires that they
either have JSCLASS_FOREGROUND_FINALIZE or JSCLASS_BACKGROUND_FINALIZE set.
Previously, only the BACKGROUND flag existed and FOREGROUND was implicit.
gi/boxed.cpp | 3 ++-
gi/fundamental.cpp | 2 +-
gi/gtype.cpp | 3 ++-
gi/ns.cpp | 2 +-
gi/object.cpp | 2 +-
gi/repo.cpp | 2 +-
gi/union.cpp | 2 +-
gjs/importer.cpp | 2 +-
test/gjs-test-rooting.cpp | 2 +-
9 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index b31920f..bcceb60 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -936,7 +936,8 @@ static const struct JSClassOps gjs_boxed_class_ops = {
*/
struct JSClass gjs_boxed_class = {
"GObject_Boxed",
- JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(1),
+ JSCLASS_HAS_PRIVATE | JSCLASS_FOREGROUND_FINALIZE |
+ JSCLASS_HAS_RESERVED_SLOTS(1),
&gjs_boxed_class_ops
};
diff --git a/gi/fundamental.cpp b/gi/fundamental.cpp
index 96a7fc5..5bcfbc6 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -561,7 +561,7 @@ static const struct JSClassOps gjs_fundamental_class_ops = {
struct JSClass gjs_fundamental_instance_class = {
"GFundamental_Object",
- JSCLASS_HAS_PRIVATE,
+ JSCLASS_HAS_PRIVATE | JSCLASS_FOREGROUND_FINALIZE,
&gjs_fundamental_class_ops
};
diff --git a/gi/gtype.cpp b/gi/gtype.cpp
index 3b832da..fe365fe 100644
--- a/gi/gtype.cpp
+++ b/gi/gtype.cpp
@@ -39,7 +39,8 @@ static JSObject *gjs_gtype_get_proto(JSContext *) G_GNUC_UNUSED;
static bool gjs_gtype_define_proto(JSContext *, JS::HandleObject,
JS::MutableHandleObject);
-GJS_DEFINE_PROTO_ABSTRACT("GIRepositoryGType", gtype, 0);
+GJS_DEFINE_PROTO_ABSTRACT("GIRepositoryGType", gtype,
+ JSCLASS_FOREGROUND_FINALIZE);
/* priv_from_js adds a "*", so this returns "void *" */
GJS_DEFINE_PRIV_FROM_JS(void, gjs_gtype_class);
diff --git a/gi/ns.cpp b/gi/ns.cpp
index 5fc9ca0..74224e4 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -164,7 +164,7 @@ static const struct JSClassOps gjs_ns_class_ops = {
struct JSClass gjs_ns_class = {
"GIRepositoryNamespace",
- JSCLASS_HAS_PRIVATE,
+ JSCLASS_HAS_PRIVATE | JSCLASS_FOREGROUND_FINALIZE,
&gjs_ns_class_ops
};
diff --git a/gi/object.cpp b/gi/object.cpp
index ae414d7..87260e1 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1791,7 +1791,7 @@ static const struct JSClassOps gjs_object_class_ops = {
struct JSClass gjs_object_instance_class = {
"GObject_Object",
- JSCLASS_HAS_PRIVATE,
+ JSCLASS_HAS_PRIVATE | JSCLASS_FOREGROUND_FINALIZE,
&gjs_object_class_ops
};
diff --git a/gi/repo.cpp b/gi/repo.cpp
index 0406ce4..123b381 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -234,7 +234,7 @@ static const struct JSClassOps gjs_repo_class_ops = {
struct JSClass gjs_repo_class = {
"GIRepository", /* means "new GIRepository()" works */
- JSCLASS_HAS_PRIVATE,
+ JSCLASS_HAS_PRIVATE | JSCLASS_FOREGROUND_FINALIZE,
&gjs_repo_class_ops,
};
diff --git a/gi/union.cpp b/gi/union.cpp
index aa54a1f..205ad54 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -300,7 +300,7 @@ static const struct JSClassOps gjs_union_class_ops = {
struct JSClass gjs_union_class = {
"GObject_Union",
- JSCLASS_HAS_PRIVATE,
+ JSCLASS_HAS_PRIVATE | JSCLASS_FOREGROUND_FINALIZE,
&gjs_union_class_ops
};
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index 2904211..b2f7cda 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -875,7 +875,7 @@ static const js::ObjectOps gjs_importer_object_ops = {
const js::Class gjs_importer_real_class = {
"GjsFileImporter",
- JSCLASS_HAS_PRIVATE,
+ JSCLASS_HAS_PRIVATE | JSCLASS_FOREGROUND_FINALIZE,
&gjs_importer_class_ops,
nullptr,
nullptr,
diff --git a/test/gjs-test-rooting.cpp b/test/gjs-test-rooting.cpp
index 3b90b52..1f3b5dc 100644
--- a/test/gjs-test-rooting.cpp
+++ b/test/gjs-test-rooting.cpp
@@ -37,7 +37,7 @@ static const JSClassOps test_obj_class_ops = {
static JSClass test_obj_class = {
"TestObj",
- JSCLASS_HAS_PRIVATE,
+ JSCLASS_HAS_PRIVATE | JSCLASS_FOREGROUND_FINALIZE,
&test_obj_class_ops
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]