openbsd-ports/x11/gnome/gjs/patches/patch-gi_object_c
2012-01-16 11:17:14 +00:00

31 lines
1.1 KiB
Plaintext

$OpenBSD: patch-gi_object_c,v 1.3 2012/01/16 11:17:14 ajacoutot Exp $
Revert 72bc4307860a315f9d2173d700582add938d79a0
as our spidermonkey port does not have JS_updateMallocCounter().
https://bugzilla.gnome.org/show_bug.cgi?id=660431
--- gi/object.c.orig Fri Jan 13 22:31:51 2012
+++ gi/object.c Mon Jan 16 12:08:48 2012
@@ -674,7 +674,9 @@ GJS_NATIVE_CONSTRUCTOR_DECLARE(object_instance)
if (unthreadsafe_template_for_constructor.gobj == NULL) {
GParameter *params;
int n_params;
+#ifdef JS_updateMallocCounter
GTypeQuery query;
+#endif
JSObject *old_jsobj;
gtype = g_registered_type_info_get_g_type( (GIRegisteredTypeInfo*) priv->info);
@@ -711,8 +713,10 @@ GJS_NATIVE_CONSTRUCTOR_DECLARE(object_instance)
goto out;
}
+#ifdef JS_updateMallocCounter
g_type_query(gtype, &query);
JS_updateMallocCounter(context, query.instance_size);
+#endif
if (G_IS_INITIALLY_UNOWNED(priv->gobj) &&
!g_object_is_floating(priv->gobj)) {