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

Unified Diff: components/autofill/content/browser/content_autofill_driver_factory.cc

Issue 788323003: Paper over a crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more accurate message in error log Created 6 years 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 | components/password_manager/content/browser/content_password_manager_driver_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/browser/content_autofill_driver_factory.cc
diff --git a/components/autofill/content/browser/content_autofill_driver_factory.cc b/components/autofill/content/browser/content_autofill_driver_factory.cc
index 01322b8e35d19fa0f96ea24e3b8f01e8bb177c92..bb19f3c912be25da672fde49ab9fd17e39adb50c 100644
--- a/components/autofill/content/browser/content_autofill_driver_factory.cc
+++ b/components/autofill/content/browser/content_autofill_driver_factory.cc
@@ -90,6 +90,14 @@ void ContentAutofillDriverFactory::RenderFrameDeleted(
void ContentAutofillDriverFactory::DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) {
+ // This shouldn't happen, but is causing a lot of crashes.
+ // See http://crbug.com/438951
+ if (frame_driver_map_.find(web_contents()->GetMainFrame()) ==
+ frame_driver_map_.end()) {
+ LOG(ERROR) << "Could not find ContentAutofillDriver for main frame";
+ return;
+ }
+
frame_driver_map_[web_contents()->GetMainFrame()]->DidNavigateFrame(details,
params);
}
« no previous file with comments | « no previous file | components/password_manager/content/browser/content_password_manager_driver_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698