[gjs] object: Don't search more interfaces after resolving



commit 5e567227d6862290d8c7c2be8296258ae5c99455
Author: Philip Chimento <philip chimento gmail com>
Date:   Fri Jan 13 00:05:04 2017 -0800

    object: Don't search more interfaces after resolving
    
    Once a method name is resolved on an object and the method defined,
    there's no need to search through any more interfaces. We can break out
    of the loop here.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777205

 gi/object.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index 8e71aea..8da0403 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -643,6 +643,8 @@ object_instance_new_resolve_no_info(JSContext       *context,
                 } else {
                     ret = false;
                 }
+                g_base_info_unref((GIBaseInfo*) method_info);
+                break;
             }
 
             g_base_info_unref( (GIBaseInfo*) method_info);


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