From 5f32e5a9d51cc80a15d8477b08aebba3ad141f6a Mon Sep 17 00:00:00 2001 From: "nona@chromium.org" Date: Thu, 12 Jul 2012 02:58:13 +0000 Subject: 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 --- chrome/browser/chromeos/input_method/ibus_engine_controller.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'chrome/browser/chromeos') 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_; -- cgit v1.1