[seed] Fixing importer



commit 47d6a8325dd6f2608f6af256f4802ea8c689047e
Author: Danilo Cesar Lemes de Paula <danilo cesar collabora co uk>
Date:   Mon Jan 11 11:14:21 2016 -0200

    Fixing importer
    
    After caab25e4c8ae5a463eb256e3012c7e4f4d7be7bc the import system of
    native modules got broken.
    
    By checking the caab25e4c8ae5a463eb256e3012c7e4f4d7be7bc, seems like
    the logic was a bit changed, allowing the importer to keep importing
    things after the module was successfully loaded.
    
    This commit should fix that.

 libseed/seed-importer.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libseed/seed-importer.c b/libseed/seed-importer.c
index ae75d1f..5ed42fc 100644
--- a/libseed/seed-importer.c
+++ b/libseed/seed-importer.c
@@ -881,6 +881,9 @@ seed_importer_search_dirs (JSContextRef ctx, GSList *path, gchar *prop, JSValueR
                                        prop_as_lib, exception);
                        g_free (test_path);
                        walk = walk->next;
+
+                       if (ret)
+                           break;
                }
     }
 #endif
@@ -892,6 +895,9 @@ seed_importer_search_dirs (JSContextRef ctx, GSList *path, gchar *prop, JSValueR
                        ret = seed_importer_try_load (ctx, test_path, script_path, prop, prop_as_js,
                                        prop_as_lib, exception);
                        walk = walk->next;
+
+                       if (ret)
+                           break;
                }
        }
 


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