[gjs/wip/ptomato/mozjs31: 13/26] object: Root misc functions
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs31: 13/26] object: Root misc functions
- Date: Thu, 3 Nov 2016 01:26:53 +0000 (UTC)
commit d074d7a9f1a77641fc6428a2e29dca63d4909e97
Author: Philip Chimento <philip endlessm com>
Date: Wed Nov 2 16:19:25 2016 -0700
object: Root misc functions
This converts everything else in object.cpp to use exact rooting, that
would otherwise have caused a compile error in mozjs31.
gi/object.cpp | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index 40b8441..2d682c4 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1065,10 +1065,8 @@ wrapped_gobj_toggle_notify(gpointer data,
G_OBJECT_TYPE_NAME(gobj));
}
if (is_sweeping) {
- JSObject *object;
-
- object = peek_js_obj(gobj);
- if (JS_IsAboutToBeFinalized(&object)) {
+ JS::RootedObject object(js_context, peek_js_obj(gobj));
+ if (JS_IsAboutToBeFinalized(object.address())) {
/* Ouch, the JS object is dead already. Disassociate the GObject
* and hope the GObject dies too.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]