[gjs] Mark that all our JSClasses support write barriers
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] Mark that all our JSClasses support write barriers
- Date: Sat, 14 Jan 2017 06:22:21 +0000 (UTC)
commit fdb7fbd737ae7c723b8773a0dc0b0c794eda3b52
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Feb 18 03:18:25 2014 +0100
Mark that all our JSClasses support write barriers
JSClasses without a trace hook trivially support them, and the
others are using JS::Heap<>, which takes care of calling the GC
before mutating the pointer.
https://bugzilla.gnome.org/show_bug.cgi?id=724797
gi/boxed.cpp | 3 ++-
gi/function.cpp | 3 ++-
gi/gerror.cpp | 3 ++-
gi/interface.cpp | 3 ++-
gi/keep-alive.cpp | 3 ++-
gi/ns.cpp | 3 ++-
gi/object.cpp | 3 ++-
gi/param.cpp | 3 ++-
gi/repo.cpp | 3 ++-
gi/union.cpp | 3 ++-
gjs/byteArray.cpp | 3 ++-
gjs/coverage.cpp | 3 ++-
gjs/importer.cpp | 3 ++-
gjs/jsapi-util.cpp | 3 ++-
14 files changed, 28 insertions(+), 14 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index da6eea1..09e20e3 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -892,7 +892,8 @@ struct JSClass gjs_boxed_class = {
"GObject_Boxed",
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
- JSCLASS_HAS_RESERVED_SLOTS(1),
+ JSCLASS_HAS_RESERVED_SLOTS(1) |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
diff --git a/gi/function.cpp b/gi/function.cpp
index 76aa885..7d72c59 100644
--- a/gi/function.cpp
+++ b/gi/function.cpp
@@ -1462,7 +1462,8 @@ function_to_string (JSContext *context,
struct JSClass gjs_function_class = {
"GIRepositoryFunction", /* means "new GIRepositoryFunction()" works */
JSCLASS_HAS_PRIVATE |
- JSCLASS_BACKGROUND_FINALIZE,
+ JSCLASS_BACKGROUND_FINALIZE |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
diff --git a/gi/gerror.cpp b/gi/gerror.cpp
index 001e2fc..bf07e3b 100644
--- a/gi/gerror.cpp
+++ b/gi/gerror.cpp
@@ -277,7 +277,8 @@ struct JSClass gjs_error_class = {
"GLib_Error",
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
- JSCLASS_BACKGROUND_FINALIZE,
+ JSCLASS_BACKGROUND_FINALIZE |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
diff --git a/gi/interface.cpp b/gi/interface.cpp
index 0347812..3206013 100644
--- a/gi/interface.cpp
+++ b/gi/interface.cpp
@@ -159,7 +159,8 @@ struct JSClass gjs_interface_class = {
"GObject_Interface",
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
- JSCLASS_BACKGROUND_FINALIZE,
+ JSCLASS_BACKGROUND_FINALIZE |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
diff --git a/gi/keep-alive.cpp b/gi/keep-alive.cpp
index df11e5a..8adbabc 100644
--- a/gi/keep-alive.cpp
+++ b/gi/keep-alive.cpp
@@ -148,7 +148,8 @@ keep_alive_trace(JSTracer *tracer,
*/
struct JSClass gjs_keep_alive_class = {
"__private_GjsKeepAlive", /* means "new __private_GjsKeepAlive()" works */
- JSCLASS_HAS_PRIVATE,
+ JSCLASS_HAS_PRIVATE |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
diff --git a/gi/ns.cpp b/gi/ns.cpp
index 2930db7..933e818 100644
--- a/gi/ns.cpp
+++ b/gi/ns.cpp
@@ -158,7 +158,8 @@ ns_finalize(JSFreeOp *fop,
struct JSClass gjs_ns_class = {
"GIRepositoryNamespace",
JSCLASS_HAS_PRIVATE |
- JSCLASS_NEW_RESOLVE,
+ JSCLASS_NEW_RESOLVE |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
diff --git a/gi/object.cpp b/gi/object.cpp
index 28e74d6..3806ce4 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1904,7 +1904,8 @@ to_string_func(JSContext *context,
struct JSClass gjs_object_instance_class = {
"GObject_Object",
JSCLASS_HAS_PRIVATE |
- JSCLASS_NEW_RESOLVE,
+ JSCLASS_NEW_RESOLVE |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
object_instance_get_prop,
diff --git a/gi/param.cpp b/gi/param.cpp
index 1b18150..fd10ceb 100644
--- a/gi/param.cpp
+++ b/gi/param.cpp
@@ -146,7 +146,8 @@ struct JSClass gjs_param_class = {
"GObject_ParamSpec",
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
- JSCLASS_BACKGROUND_FINALIZE,
+ JSCLASS_BACKGROUND_FINALIZE |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
diff --git a/gi/repo.cpp b/gi/repo.cpp
index dff585e..7b8a1ed 100644
--- a/gi/repo.cpp
+++ b/gi/repo.cpp
@@ -210,7 +210,8 @@ repo_finalize(JSFreeOp *fop,
struct JSClass gjs_repo_class = {
"GIRepository", /* means "new GIRepository()" works */
JSCLASS_HAS_PRIVATE |
- JSCLASS_NEW_RESOLVE,
+ JSCLASS_NEW_RESOLVE |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
diff --git a/gi/union.cpp b/gi/union.cpp
index 38a1405..2fc16c0 100644
--- a/gi/union.cpp
+++ b/gi/union.cpp
@@ -288,7 +288,8 @@ to_string_func(JSContext *context,
struct JSClass gjs_union_class = {
"GObject_Union",
JSCLASS_HAS_PRIVATE |
- JSCLASS_NEW_RESOLVE,
+ JSCLASS_NEW_RESOLVE |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
diff --git a/gjs/byteArray.cpp b/gjs/byteArray.cpp
index 78e6a18..675202e 100644
--- a/gjs/byteArray.cpp
+++ b/gjs/byteArray.cpp
@@ -56,7 +56,8 @@ static void byte_array_finalize (JSFreeOp *fop,
struct JSClass gjs_byte_array_class = {
"ByteArray",
JSCLASS_HAS_PRIVATE |
- JSCLASS_BACKGROUND_FINALIZE,
+ JSCLASS_BACKGROUND_FINALIZE |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
(JSPropertyOp)byte_array_get_prop,
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index e50703f..3304141 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1260,7 +1260,8 @@ gjs_coverage_init(GjsCoverage *self)
static JSClass coverage_global_class = {
"GjsCoverageGlobal",
- JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(GJS_GLOBAL_SLOT_LAST),
+ JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(GJS_GLOBAL_SLOT_LAST) |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
diff --git a/gjs/importer.cpp b/gjs/importer.cpp
index 9f96f5c..f997267 100644
--- a/gjs/importer.cpp
+++ b/gjs/importer.cpp
@@ -938,7 +938,8 @@ struct JSClass gjs_importer_class = {
"GjsFileImporter",
JSCLASS_HAS_PRIVATE |
JSCLASS_NEW_RESOLVE |
- JSCLASS_NEW_ENUMERATE,
+ JSCLASS_NEW_ENUMERATE |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index decac55..cacf7dc 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -46,7 +46,8 @@ gjs_util_error_quark (void)
static JSClass global_class = {
"GjsGlobal",
- JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(GJS_GLOBAL_SLOT_LAST),
+ JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(GJS_GLOBAL_SLOT_LAST) |
+ JSCLASS_IMPLEMENTS_BARRIERS,
JS_PropertyStub,
JS_DeletePropertyStub,
JS_PropertyStub,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]