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

Unified Diff: chrome/browser/autofill/autofill_manager.cc

Issue 11308287: [autofill] Fix crash while closing tab or browser window with interactive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index aeeca26fbfef722c4a49830608ededf7de46c05d..73b1446718774323e8f0d7eab9a54bc5f701336b 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -779,6 +779,11 @@ void AutofillManager::OnRequestAutocomplete(const FormData& form) {
}
void AutofillManager::ReturnAutocompleteData(const FormStructure* result) {
+ // web_contents() will be NULL when the interactive autocomplete is closed due
+ // to a tab or browser window closing.
+ if (!web_contents())
+ return;
+
RenderViewHost* host = web_contents()->GetRenderViewHost();
if (!host)
return;
« 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