[gjs/wip/ptomato/mozjs31: 21/21] WIP - stuff
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs31: 21/21] WIP - stuff
- Date: Tue, 8 Nov 2016 02:11:45 +0000 (UTC)
commit af3606d961f05e50bc62e311f8cca3da0c8b9a01
Author: Philip Chimento <philip endlessm com>
Date: Mon Nov 7 18:09:36 2016 -0800
WIP - stuff
gi/gtype.cpp | 6 ++++--
installed-tests/gjs-unit.cpp | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gi/gtype.cpp b/gi/gtype.cpp
index 35e287f..10ba932 100644
--- a/gi/gtype.cpp
+++ b/gi/gtype.cpp
@@ -126,13 +126,15 @@ gjs_gtype_create_gtype_wrapper (JSContext *context,
/* put constructor for GIRepositoryGType() in the global namespace */
JS::RootedObject global(context, gjs_get_import_global(context));
- gjs_gtype_create_proto(context, global, "GIRepositoryGType", JS::NullPtr());
+ JS::RootedObject proto(context,
+ gjs_gtype_create_proto(context, global, "GIRepositoryGType", JS::NullPtr()).toObjectOrNull());
object = (JSObject*) g_type_get_qdata(gtype, gjs_get_gtype_wrapper_quark());
if (object != NULL)
goto out;
- object = JS_NewObject(context, &gjs_gtype_class, JS::NullPtr(), JS::NullPtr());
+ object = JS_NewObjectWithGivenProto(context, &gjs_gtype_class, proto,
+ JS::NullPtr());
if (object == NULL)
goto out;
diff --git a/installed-tests/gjs-unit.cpp b/installed-tests/gjs-unit.cpp
index 7f85cff..3310ae5 100644
--- a/installed-tests/gjs-unit.cpp
+++ b/installed-tests/gjs-unit.cpp
@@ -103,9 +103,9 @@ teardown(GjsTestJSFixture *fix,
g_clear_object(&fix->coverage);
}
- gjs_memory_report("before destroying context", false);
+ //gjs_memory_report("before destroying context", false);
g_object_unref(fix->context);
- gjs_memory_report("after destroying context", true);
+ //gjs_memory_report("after destroying context", true);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]