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

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: Refine checking. 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..d0c5092df69165ec7e5fbb0f1989f6482dc2a5c6 100644
--- a/chrome/browser/chromeos/input_method/ibus_controller_impl.cc
+++ b/chrome/browser/chromeos/input_method/ibus_controller_impl.cc
@@ -485,8 +485,12 @@ 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));
+ void* attached_data = g_object_get_data(G_OBJECT(ibus_), kPanelObjectKey);
Yusuke Sato 2012/05/23 00:43:08 please add a comment which explains when/why g_obj
Seigo Nonaka 2012/05/23 00:56:59 I don't know why g_object_get_data fails. (I doubt
+ 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