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

Unified Diff: ui/keyboard/keyboard_controller.cc

Issue 2801213002: Output warning when the container window doesn't exist unexpectedly (Closed)
Patch Set: Created 3 years, 8 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: ui/keyboard/keyboard_controller.cc
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
index 676da64d047e71106edad66bed6ce9436923b5f1..48cc52020d9cf07abdb0a6fba30669e0839df61f 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -406,8 +406,11 @@ void KeyboardController::OnShowImeIfNeeded() {
}
void KeyboardController::ShowKeyboardInternal(int64_t display_id) {
- if (!container_.get())
+ DCHECK(container_.get());
+ if (!container_.get()) {
+ LOG(WARNING) << "container_ was not initialized unexpectedly.";
bshe 2017/04/10 13:38:37 If you have a DCHECK, you shouldn't need to handle
oka 2017/04/13 09:07:57 Done. I added DCHECK only and commened the rationa
return;
+ }
if (container_->children().empty()) {
keyboard::MarkKeyboardLoadStarted();
« 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