Commit 2bab6931 authored by estade's avatar estade Committed by Commit bot

Paper over a crash.

This quick fix is designed to make trunk more stable and to be easy to apply and revert as needed.

BUG=438951
TBR=vabr@chromium.org

Review URL: https://codereview.chromium.org/788323003

Cr-Commit-Position: refs/heads/master@{#308153}
parent 67c6ae27
......@@ -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);
}
......
......@@ -101,6 +101,14 @@ void ContentPasswordManagerDriverFactory::DidNavigateAnyFrame(
content::RenderFrameHost* render_frame_host,
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(render_frame_host) == frame_driver_map_.end()) {
LOG(ERROR) << "Could not find ContentPasswordManagerDriver for frame " <<
render_frame_host;
return;
}
frame_driver_map_[render_frame_host]->DidNavigateFrame(details, params);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment