[seed] Update importer to support mutually inclusive files



commit 6daf67689c20e7164fd1c5ceacbb74f6533c87ce
Author: Robert Carr <racarr mireia (none)>
Date:   Tue Apr 14 23:03:02 2009 -0400

    Update importer to support mutually inclusive files
---
 libseed/seed-importer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libseed/seed-importer.c b/libseed/seed-importer.c
index c7d7d43..aa73463 100644
--- a/libseed/seed-importer.c
+++ b/libseed/seed-importer.c
@@ -584,9 +584,10 @@ seed_importer_handle_file (JSContextRef ctx,
   global = JSContextGetGlobalObject (nctx);
   JSValueProtect (eng->context, global);
   
+  g_hash_table_insert (file_imports, file_path, global);
+
   JSEvaluateScript (nctx, file_contents, NULL, file_name, 0, exception);
 
-  g_hash_table_insert (file_imports, file_path, global);
   // Does leak...but it's a debug statement.
   SEED_NOTE (IMPORTER, "Evaluated file, exception: %s", 
 	     *exception ? seed_exception_to_string (ctx, *exception) : "(null)");



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