[gjs] Return TRUE from GIRepositoryNamespace.resolve if no error



commit 663e9dfedec9be62b90fc3311dbd0f4f23a0513f
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu May 19 18:39:54 2011 +0200

    Return TRUE from GIRepositoryNamespace.resolve if no error
    
    Even if nothing is set, we must return TRUE when there is no error
    (so the normal property lookup is performed, eventually returning
    "undefined"), otherwise JS_ExecuteScript fails with no exception.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646633

 gi/ns.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gi/ns.c b/gi/ns.c
index 3769f0a..b9a1ea7 100644
--- a/gi/ns.c
+++ b/gi/ns.c
@@ -114,7 +114,9 @@ ns_new_resolve(JSContext *context,
                 goto out;
             }
         } else {
+            /* No property defined, but no error either, so return TRUE */
             JS_EndRequest(context);
+            ret = JS_TRUE;
             goto out;
         }
     }



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