summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/input_method
diff options
context:
space:
mode:
authornona@chromium.org <nona@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-12 02:58:13 +0000
committernona@chromium.org <nona@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-12 02:58:13 +0000
commit5f32e5a9d51cc80a15d8477b08aebba3ad141f6a (patch)
tree90e7b290ac58e9e6c1a25dba3c3809268d794e75 /chrome/browser/chromeos/input_method
parente12e6920501a1c42e1f9450484baba0ceacf0db0 (diff)
downloadchromium_src-5f32e5a9d51cc80a15d8477b08aebba3ad141f6a.zip
chromium_src-5f32e5a9d51cc80a15d8477b08aebba3ad141f6a.tar.gz
chromium_src-5f32e5a9d51cc80a15d8477b08aebba3ad141f6a.tar.bz2
Merge 144976 - Fix crash on shutting down.
Skip calling destroy function in the case of the connection is lost. BUG=134481 TEST=Manually done on lumpy Review URL: https://chromiumcodereview.appspot.com/10695004 TBR=nona@chromium.org Review URL: https://chromiumcodereview.appspot.com/10698162 git-svn-id: svn://svn.chromium.org/chrome/branches/1180/src@146278 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/input_method')
-rw-r--r--chrome/browser/chromeos/input_method/ibus_engine_controller.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/chromeos/input_method/ibus_engine_controller.cc b/chrome/browser/chromeos/input_method/ibus_engine_controller.cc
index f480a03..e52e143 100644
--- a/chrome/browser/chromeos/input_method/ibus_engine_controller.cc
+++ b/chrome/browser/chromeos/input_method/ibus_engine_controller.cc
@@ -886,8 +886,13 @@ class IBusEngineControllerImpl : public IBusEngineController {
g_object_unref(chromeos_engine->table);
chromeos_engine->table = NULL;
}
- IBUS_OBJECT_CLASS(ibus_chromeos_engine_parent_class)
- ->destroy(IBUS_OBJECT(chromeos_engine));
+ if (ibus_bus_is_connected(chromeos_engine->connection->ibus_)) {
+ // We can't call destroy function without ibus-daemon connection,
+ // otherwise browser goes into deadlock state.
+ // TODO(nona): investigate the reason of dead-lock.
+ IBUS_OBJECT_CLASS(ibus_chromeos_engine_parent_class)
+ ->destroy(IBUS_OBJECT(chromeos_engine));
+ }
}
IBusEngineController::Observer* observer_;