| Index: chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
|
| diff --git a/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc b/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
|
| index c66528c4d44008c916807bff84ae52325561006d..c6e5637919c41e29ce002e20d56bc9a197cfc8ef 100644
|
| --- a/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
|
| +++ b/chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc
|
| @@ -38,7 +38,11 @@ TabAutofillManagerDelegate::TabAutofillManagerDelegate(
|
| }
|
|
|
| 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 @@ void TabAutofillManagerDelegate::DidNavigateMainFrame(
|
| HideAutocheckoutBubble();
|
| }
|
|
|
| +void TabAutofillManagerDelegate::WebContentsDestroyed(
|
| + content::WebContents* web_contents) {
|
| + HideAutofillPopup();
|
| +}
|
| +
|
| } // namespace autofill
|
|
|