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

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

Issue 10413062: More strict check for IBusPanelService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add comment Created 8 years, 7 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: chrome/browser/chromeos/input_method/ibus_controller_impl.cc
diff --git a/chrome/browser/chromeos/input_method/ibus_controller_impl.cc b/chrome/browser/chromeos/input_method/ibus_controller_impl.cc
index 266ab4c43089e4e3b1d608812f270bb67c44f218..8a3acdcd48241ae84c436fb680827518d8acd3d1 100644
--- a/chrome/browser/chromeos/input_method/ibus_controller_impl.cc
+++ b/chrome/browser/chromeos/input_method/ibus_controller_impl.cc
@@ -485,8 +485,14 @@ IBusControllerImpl::~IBusControllerImpl() {
this);
// Disconnect signals for the panel service as well.
- IBusPanelService* ibus_panel_service = IBUS_PANEL_SERVICE(
- g_object_get_data(G_OBJECT(ibus_), kPanelObjectKey));
+ // When Chrome is shutting down, g_object_get_data fails and returns NULL.
+ // TODO(nona): Investigate the reason of failure(crosbug.com/129142).
+ void* attached_data = g_object_get_data(G_OBJECT(ibus_), kPanelObjectKey);
+ if (!attached_data)
+ return;
+ if (!G_TYPE_CHECK_INSTANCE_TYPE(attached_data, IBUS_TYPE_PANEL_SERVICE))
+ return;
+ IBusPanelService* ibus_panel_service = IBUS_PANEL_SERVICE(attached_data);
if (ibus_panel_service) {
g_signal_handlers_disconnect_by_func(
ibus_panel_service,
« 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