Create an instance of GDBusProxy with G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag.
authorYusuke Sato <yusukes@chromium.org>
Sun, 26 Dec 2010 22:57:09 +0000 (07:57 +0900)
committerYusuke Sato <yusukes@chromium.org>
Sun, 26 Dec 2010 22:57:09 +0000 (07:57 +0900)
Without the flag, on_name_owner_changed() in glib-2.26.x/gio/gdbusproxy.c might invoke a remote method named GetAll in org.freedesktop.DBus.Properties interface, but the method is not implemented in ibus-daemon. Since ibus-daemon ignores the method call, the caller, which is UI thread of Chrome on Chromium OS, will block for 25 seconds (i.e. the default timeout of GDBus) waiting for a reply.

BUG=none
TEST=manually

Review URL: http://codereview.appspot.com/3836042

src/ibusconfig.c
src/ibusinputcontext.c

index 5f44afa..f6fbe37 100644 (file)
@@ -142,7 +142,7 @@ ibus_config_new (GDBusConnection  *connection,
                                cancellable,
                                error,
                                "g-connection",      connection,
-                               "g-flags",           G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
+                               "g-flags",           G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START | G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
                                "g-name",            IBUS_SERVICE_CONFIG,
                                "g-interface-name",  IBUS_INTERFACE_CONFIG,
                                "g-object-path",     IBUS_PATH_CONFIG,
index 6567934..88afc22 100644 (file)
@@ -656,7 +656,7 @@ ibus_input_context_new (const gchar     *path,
                                error,
                                "g-connection",      connection,
                                "g-name",            "org.freedesktop.IBus",
-                               "g-flags",           G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
+                               "g-flags",           G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START | G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
                                "g-interface-name",  IBUS_INTERFACE_INPUT_CONTEXT,
                                "g-object-path",     path,
                                NULL);