[gjs/wip/ptomato/mozjs38: 3/5] closure: Use JS::Heap wrapper for closure object
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs38: 3/5] closure: Use JS::Heap wrapper for closure object
- Date: Tue, 10 Jan 2017 05:50:36 +0000 (UTC)
commit 5836049f094d0ce75541fb3c4885f3376b38306c
Author: Philip Chimento <philip chimento gmail com>
Date: Sat Jan 7 22:23:35 2017 -0800
closure: Use JS::Heap wrapper for closure object
This needs to be done in case the garbage collector moves the JSObject
somewhere else. This was left over from the SpiderMonkey 31 port.
https://bugzilla.gnome.org/show_bug.cgi?id=776966
gi/closure.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/closure.cpp b/gi/closure.cpp
index 4b1b07a..cdae2d2 100644
--- a/gi/closure.cpp
+++ b/gi/closure.cpp
@@ -36,7 +36,7 @@ typedef struct {
GClosure base;
JSRuntime *runtime;
JSContext *context;
- JSObject *obj;
+ JS::Heap<JSObject *> obj;
guint unref_on_global_object_finalized : 1;
} Closure;
@@ -338,7 +338,7 @@ gjs_closure_trace(GClosure *closure,
if (c->obj == NULL)
return;
- JS_CallObjectTracer(tracer, &c->obj, "signal connection");
+ JS_CallHeapObjectTracer(tracer, &c->obj, "signal connection");
}
GClosure*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]