$OpenBSD: patch-loaders_gjs_peas-plugin-loader-gjs_c,v 1.1 2013/08/10 12:48:32 ajacoutot Exp $

From 8c54d0ee9c929d9141f74a0c047fed2e28347aa3 Mon Sep 17 00:00:00 2001
From: Garrett Regier <garrettregier@gmail.com>
Date: Sat, 27 Apr 2013 11:36:13 +0000
Subject: Fix Gjs plugin loader

--- loaders/gjs/peas-plugin-loader-gjs.c.orig	Tue Jun 18 12:31:41 2013
+++ loaders/gjs/peas-plugin-loader-gjs.c	Sat Aug 10 12:25:03 2013
@@ -279,7 +279,7 @@ peas_plugin_loader_gjs_create_extension (PeasPluginLoa
 
       if (!JS_GetPropertyById (js_context, ginfo->extensions,
                                prop_name_id, &prop_extension_ctor) ||
-          prop_extension_ctor != extension_ctor)
+          JSVAL_TO_OBJECT (prop_extension_ctor) != JSVAL_TO_OBJECT (extension_ctor))
         continue;
 
       if (!JS_IdToValue (js_context, prop_name_id, &prop_name_val) ||
@@ -327,7 +327,7 @@ static void
 garbage_collect (PeasPluginInfo *info,
                  GjsInfo        *ginfo)
 {
-  JS_GC (gjs_context_get_native_context (ginfo->context));
+  gjs_context_gc (ginfo->context);
 }
 
 static void
