[seed] Some more importer cleanup stuff



commit f79987039e87d7ca1164e3ef077e5a03659163ea
Author: Robert Carr <racarr mireia (none)>
Date:   Mon Apr 13 17:23:48 2009 -0400

    Some more importer cleanup stuff
---
 libseed/seed-importer.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/libseed/seed-importer.c b/libseed/seed-importer.c
index 2551d0f..aa94295 100644
--- a/libseed/seed-importer.c
+++ b/libseed/seed-importer.c
@@ -313,6 +313,9 @@ seed_gi_importer_do_namespace (JSContextRef ctx,
   
   if (namespace_ref = g_hash_table_lookup (gi_imports, namespace))
     {
+      SEED_NOTE (IMPORTER, "Using existing namespace ref (%p) for %s",
+		 namespace_ref, namespace);
+      JSValueProtect (ctx, namespace_ref);
       return namespace_ref;
     }
   
@@ -328,9 +331,11 @@ seed_gi_importer_do_namespace (JSContextRef ctx,
   
   n = g_irepository_get_n_infos (NULL, namespace);
   
-  namespace_ref = JSObjectMake (eng->context, NULL, NULL);
+  namespace_ref = JSObjectMake (ctx, NULL, NULL);
+  SEED_NOTE (IMPORTER, "Constructing namespace ref (%p) for %s",
+	     namespace_ref, namespace);
 
-  JSValueProtect (eng->context, namespace_ref);
+  JSValueProtect (ctx, namespace_ref);
   
   for (i = 0; i < n; i++)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]