Commit ba9261ea authored by estade's avatar estade Committed by Commit bot
Browse files

Don't attempt to show validation bubble for unparented web contents.

This fix is speculative because I can't actually repro the bug.

BUG=616990

Review-Url: https://codereview.chromium.org/2104513004
Cr-Commit-Position: refs/heads/master@{#402349}
parent 0c915f7f
...@@ -1261,6 +1261,10 @@ void Browser::ShowValidationMessage(content::WebContents* web_contents, ...@@ -1261,6 +1261,10 @@ void Browser::ShowValidationMessage(content::WebContents* web_contents,
const gfx::Rect& anchor_in_root_view, const gfx::Rect& anchor_in_root_view,
const base::string16& main_text, const base::string16& main_text,
const base::string16& sub_text) { const base::string16& sub_text) {
// If the web contents is unparented (e.g. in a blocked popup) it does not
// make sense to show a validation message. See http://crbug.com/616990
if (!web_contents->GetTopLevelNativeWindow())
return;
validation_message_bubble_ = validation_message_bubble_ =
TabDialogs::FromWebContents(web_contents) TabDialogs::FromWebContents(web_contents)
->ShowValidationMessage(anchor_in_root_view, main_text, sub_text); ->ShowValidationMessage(anchor_in_root_view, main_text, sub_text);
......
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