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

Side by Side Diff: chrome/browser/chromeos/input_method/ibus_engine_controller.cc

Issue 10823096: Fix crash caused by uninstalling extension IME. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/input_method/ibus_engine_controller.h" 5 #include "chrome/browser/chromeos/input_method/ibus_engine_controller.h"
6 6
7 #if defined(HAVE_IBUS) 7 #if defined(HAVE_IBUS)
8 #include <ibus.h> 8 #include <ibus.h>
9 #endif 9 #endif
10 10
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 } else { 879 } else {
880 connection->second->engine_instances_.erase(chromeos_engine); 880 connection->second->engine_instances_.erase(chromeos_engine);
881 if (connection->second->active_engine_ == chromeos_engine) { 881 if (connection->second->active_engine_ == chromeos_engine) {
882 connection->second->active_engine_ = NULL; 882 connection->second->active_engine_ = NULL;
883 } 883 }
884 } 884 }
885 if (chromeos_engine->table) { 885 if (chromeos_engine->table) {
886 g_object_unref(chromeos_engine->table); 886 g_object_unref(chromeos_engine->table);
887 chromeos_engine->table = NULL; 887 chromeos_engine->table = NULL;
888 } 888 }
889 if (ibus_bus_is_connected(chromeos_engine->connection->ibus_)) { 889 if (chromeos_engine->connection &&
890 // We can't call destroy function without ibus-daemon connection, 890 ibus_bus_is_connected(chromeos_engine->connection->ibus_)) {
891 // Connection may be NULL since extension IME can be uninstalled before
892 // |OnDestroy| is called.
893 // We can't call |destroy| function without ibus-daemon connection,
891 // otherwise browser goes into deadlock state. 894 // otherwise browser goes into deadlock state.
892 // TODO(nona): investigate the reason of dead-lock. 895 // TODO(nona): investigate the reason of dead-lock.
893 IBUS_OBJECT_CLASS(ibus_chromeos_engine_parent_class) 896 IBUS_OBJECT_CLASS(ibus_chromeos_engine_parent_class)
894 ->destroy(IBUS_OBJECT(chromeos_engine)); 897 ->destroy(IBUS_OBJECT(chromeos_engine));
895 } 898 }
896 } 899 }
897 900
898 IBusEngineController::Observer* observer_; 901 IBusEngineController::Observer* observer_;
899 IBusBus* ibus_; 902 IBusBus* ibus_;
900 IBusChromeOSEngine* active_engine_; 903 IBusChromeOSEngine* active_engine_;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 #else 965 #else
963 return NULL; 966 return NULL;
964 #endif 967 #endif
965 } 968 }
966 969
967 IBusEngineController::~IBusEngineController() { 970 IBusEngineController::~IBusEngineController() {
968 } 971 }
969 972
970 } // namespace input_method 973 } // namespace input_method
971 } // namespace chromeos 974 } // namespace chromeos
OLDNEW
« 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