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

Unified Diff: chrome/browser/chromeos/input_method/input_method_engine_ibus.cc

Issue 10968056: Fix crash bug of IME extension API. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix nits Created 8 years, 3 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 | chromeos/dbus/ibus/ibus_engine_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/input_method_engine_ibus.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_engine_ibus.cc b/chrome/browser/chromeos/input_method/input_method_engine_ibus.cc
index 1ca9cf74d418e6a99fd085d9360f903528126227..2af7f8bb3c90a96adcb90d7e2294d20f6bd3cacf 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine_ibus.cc
+++ b/chrome/browser/chromeos/input_method/input_method_engine_ibus.cc
@@ -55,6 +55,12 @@ InputMethodEngineIBus::InputMethodEngineIBus()
weak_ptr_factory_(this) {
}
+InputMethodEngineIBus::~InputMethodEngineIBus() {
+ GetCurrentService()->UnsetEngine();
+ input_method::InputMethodManager::GetInstance()->
+ RemoveInputMethodExtension(ibus_id_);
+}
+
void InputMethodEngineIBus::Initialize(
InputMethodEngine::Observer* observer,
const char* engine_name,
@@ -110,9 +116,6 @@ void InputMethodEngineIBus::Initialize(
RegisterComponent();
}
-InputMethodEngineIBus::~InputMethodEngineIBus() {
-}
-
bool InputMethodEngineIBus::SetComposition(
int context_id,
const char* text,
@@ -571,7 +574,7 @@ void InputMethodEngineIBus::CreateEngineHandler(
current_object_path_++;
object_path_ = dbus::ObjectPath(kObjectPathPrefix +
base::IntToString(current_object_path_));
- GetCurrentService()->Initialize(this);
+ GetCurrentService()->SetEngine(this);
sender.Run(object_path_);
}
« no previous file with comments | « no previous file | chromeos/dbus/ibus/ibus_engine_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698