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

Unified Diff: chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc

Issue 19044005: Merge 210229 "Hide autofill popup before WebContentsImpl is dest..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1547/src/
Patch Set: 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
Index: chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
===================================================================
--- chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc (revision 211372)
+++ chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc (working copy)
@@ -38,7 +38,11 @@
}
TabAutofillManagerDelegate::~TabAutofillManagerDelegate() {
- HideAutofillPopup();
+ // NOTE: It is too late to clean up the autofill popup; that cleanup process
+ // requires that the WebContents instance still be valid and it is not at
+ // this point (in particular, the WebContentsImpl destructor has already
+ // finished running and we are now in the base class destructor).
+ DCHECK(!popup_controller_);
}
PersonalDataManager* TabAutofillManagerDelegate::GetPersonalDataManager() {
@@ -205,4 +209,9 @@
HideAutocheckoutBubble();
}
+void TabAutofillManagerDelegate::WebContentsDestroyed(
+ content::WebContents* web_contents) {
+ HideAutofillPopup();
+}
+
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698