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

Unified Diff: components/autofill/core/browser/autofill_external_delegate.cc

Issue 18272015: Hide autofill popup before WebContentsImpl is destroyed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Response to review Created 7 years, 5 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 | « chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autofill_external_delegate.cc
diff --git a/components/autofill/core/browser/autofill_external_delegate.cc b/components/autofill/core/browser/autofill_external_delegate.cc
index 4fca5220adbc669e5a3233ea6a3a5d9cb6fbf569..b493726ffa76b786c8e6767a44bc5e8fd1408a64 100644
--- a/components/autofill/core/browser/autofill_external_delegate.cc
+++ b/components/autofill/core/browser/autofill_external_delegate.cc
@@ -169,8 +169,11 @@ void AutofillExternalDelegate::OnPopupShown(
void AutofillExternalDelegate::OnPopupHidden(
content::KeyboardListener* listener) {
- if (registered_keyboard_listener_with_ == web_contents_->GetRenderViewHost())
+ if ((!web_contents_->IsBeingDestroyed()) &&
+ (registered_keyboard_listener_with_ ==
+ web_contents_->GetRenderViewHost())) {
web_contents_->GetRenderViewHost()->RemoveKeyboardListener(listener);
+ }
registered_keyboard_listener_with_ = NULL;
}
« no previous file with comments | « chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698