summaryrefslogtreecommitdiff
path: root/gi/enumeration.c
diff options
context:
space:
mode:
Diffstat (limited to 'gi/enumeration.c')
-rw-r--r--gi/enumeration.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gi/enumeration.c b/gi/enumeration.c
index 329b3a72..34f9e367 100644
--- a/gi/enumeration.c
+++ b/gi/enumeration.c
@@ -137,11 +137,15 @@ gjs_define_enumeration(JSContext *context,
return JS_TRUE;
}
- enum_obj = JS_ConstructObject(context, NULL, NULL,
- gjs_get_import_global(context));
+ enum_obj = JS_ConstructObject(context, NULL, NULL, NULL);
if (enum_obj == NULL)
return JS_FALSE;
+ /* https://bugzilla.mozilla.org/show_bug.cgi?id=599651 means we
+ * can't just pass in the global as the parent */
+ JS_SetParent(context, enum_obj,
+ gjs_get_import_global (context));
+
/* Fill in enum values first, so we don't define the enum itself until we're
* sure we can finish successfully.
*/