[gjs] js: Set global object trace hook
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] js: Set global object trace hook
- Date: Sat, 10 Dec 2016 03:48:06 +0000 (UTC)
commit bc00bac264e93bfa142146690742b741563caeef
Author: Philip Chimento <philip endlessm com>
Date: Tue Nov 8 18:28:08 2016 -0800
js: Set global object trace hook
In mozjs31, global objects must have JS_GlobalObjectTraceHook() as their
"trace" member.
https://bugzilla.gnome.org/show_bug.cgi?id=751252
gjs/coverage.cpp | 17 ++++++++++++++---
gjs/jsapi-util.cpp | 17 ++++++++++++++---
2 files changed, 28 insertions(+), 6 deletions(-)
---
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index 2dd6425..5e51d5b 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -1256,9 +1256,20 @@ gjs_coverage_init(GjsCoverage *self)
}
static JSClass coverage_global_class = {
- "GjsCoverageGlobal", JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(GJS_GLOBAL_SLOT_LAST),
- JS_PropertyStub, JS_DeletePropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
- JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, NULL
+ "GjsCoverageGlobal",
+ JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(GJS_GLOBAL_SLOT_LAST),
+ JS_PropertyStub,
+ JS_DeletePropertyStub,
+ JS_PropertyStub,
+ JS_StrictPropertyStub,
+ JS_EnumerateStub,
+ JS_ResolveStub,
+ JS_ConvertStub,
+ NULL, /* finalize */
+ NULL, /* call */
+ NULL, /* hasInstance */
+ NULL, /* construct */
+ JS_GlobalObjectTraceHook
};
static bool
diff --git a/gjs/jsapi-util.cpp b/gjs/jsapi-util.cpp
index 0cd8412..509a032 100644
--- a/gjs/jsapi-util.cpp
+++ b/gjs/jsapi-util.cpp
@@ -45,9 +45,20 @@ gjs_util_error_quark (void)
}
static JSClass global_class = {
- "GjsGlobal", JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(GJS_GLOBAL_SLOT_LAST),
- JS_PropertyStub, JS_DeletePropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
- JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, NULL
+ "GjsGlobal",
+ JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(GJS_GLOBAL_SLOT_LAST),
+ JS_PropertyStub,
+ JS_DeletePropertyStub,
+ JS_PropertyStub,
+ JS_StrictPropertyStub,
+ JS_EnumerateStub,
+ JS_ResolveStub,
+ JS_ConvertStub,
+ NULL, /* finalize */
+ NULL, /* call */
+ NULL, /* hasInstance */
+ NULL, /* construct */
+ JS_GlobalObjectTraceHook
};
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]