[gjs/gnome-3-14] GjsDBusImplementation: unref the invocation passed to method_call()



commit fdc0029fe16db836a9829826a724119a560c636b
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Tue Oct 7 19:14:26 2014 -0400

    GjsDBusImplementation: unref the invocation passed to method_call()
    
    In C code, the reference passed to the method_call() virtual function
    would be passed to the return_value/error function that is eventually
    called. But since these functions are called from JS, and the calling
    convention is normalized, we need to unref reference passed to
    method_call ourselves. See GLib bug 738259 for a more complete discussion.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738122

 libgjs-private/gjs-gdbus-wrapper.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/libgjs-private/gjs-gdbus-wrapper.cpp b/libgjs-private/gjs-gdbus-wrapper.cpp
index 2e4619e..89f1f3f 100644
--- a/libgjs-private/gjs-gdbus-wrapper.cpp
+++ b/libgjs-private/gjs-gdbus-wrapper.cpp
@@ -45,6 +45,7 @@ gjs_dbus_implementation_method_call(GDBusConnection       *connection,
     GjsDBusImplementation *self = GJS_DBUS_IMPLEMENTATION (user_data);
 
     g_signal_emit(self, signals[SIGNAL_HANDLE_METHOD], 0, method_name, parameters, invocation);
+    g_object_unref (invocation);
 }
 
 static GVariant *


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