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

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: Created 7 years, 6 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
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 f8280fb99d0b81b3a8c612e3b24fd5a8ec6779b6..eb8ccdb813b3efe7f2677d199433f2f911662703 100644
--- a/components/autofill/core/browser/autofill_external_delegate.cc
+++ b/components/autofill/core/browser/autofill_external_delegate.cc
@@ -169,7 +169,8 @@ 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);
Ilya Sherman 2013/07/03 19:56:49 nit: Please add curly braces now that the conditio
blundell 2013/07/04 08:32:45 Done.
registered_keyboard_listener_with_ = NULL;

Powered by Google App Engine
This is Rietveld 408576698