Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2604)

Unified Diff: chromeos_input_method.cc

Issue 2722002: Fix a bug that causes input methods not to work in Chrome. (Closed) Base URL: ssh://git@gitrw.chromium.org//cros.git
Patch Set: address comments Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos_input_method.cc
diff --git a/chromeos_input_method.cc b/chromeos_input_method.cc
index 7ca8f78db5fe8199e6ed101a05b53d4c9c8e5b12..908b92c357cdef620d72528022b13a49f0e38f4f 100644
--- a/chromeos_input_method.cc
+++ b/chromeos_input_method.cc
@@ -500,18 +500,18 @@ class InputMethodStatusConnection {
this);
}
- if (dbus_connection_.get()) {
- // Close |dbus_connection_| since the connection is "private connection"
- // and we know |this| is the only instance which uses the
- // |dbus_connection_|. Otherwise, we may see an error message from dbus
- // library like "The last reference on a connection was dropped without
- // closing the connection."
- DBusConnection* raw_connection = dbus_g_connection_get_connection(
- dbus_connection_->g_connection());
- if (raw_connection) {
- dbus_connection_close(raw_connection);
- }
- }
+ // We don't close |dbus_connection_| since it actually shares the same
+ // socket file descriptor with the connection used in IBusBus. If we
+ // close |dbus_connection_| here, the connection used in the IBus IM
+ // module (im-ibus.so) and |ibus_| will also be closed, that causes
+ // input methods to malfunction in Chrome.
+ //
+ // Note that not closing |dbus_connection_| produces DBus warnings
+ // like below, but it's ok as warnings are not critical (See also
+ // crosbug.com/3596):
+ //
+ // The last reference on a connection was dropped without closing the
+ // connection.
if (ibus_) {
// Destruct IBus object.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698