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

Unified Diff: chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc

Issue 7833045: Fixes crash by checking for NULL when showing popup. This can happen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
index 10cf6882f4c57f48b7df489ec541312001e3b863..bf104f26523436520b0a121abe16b41ed077b56d 100644
--- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc
@@ -364,6 +364,13 @@ void AutocompletePopupContentsView::UpdatePopupAppearance() {
popup_->SetContentsView(this);
popup_->MoveAbove(
GetRelativeWindowForPopup(omnibox_view_->GetNativeView()));
+ if (!popup_.get()) {
+ // For some IMEs GetRelativeWindowForPopup triggers the omnibox to lose
+ // focus, thereby closing (and destroying) the popup.
+ // TODO: this won't be needed once we close the omnibox on input window
Peter Kasting 2011/09/12 18:36:52 ? We explicitly wanted to avoid closing the omnibo
+ // showing.
+ return;
+ }
popup_->Show();
} else {
// Animate the popup shrinking, but don't animate growing larger since that
« 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