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

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


Cr-Commit-Position: refs/heads/master@{#402349}
diff --git a/chrome/browser/ui/ b/chrome/browser/ui/
index 2b43c86..c038819 100644
--- a/chrome/browser/ui/
+++ b/chrome/browser/ui/
@@ -1261,6 +1261,10 @@
                                     const gfx::Rect& anchor_in_root_view,
                                     const base::string16& main_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
+  if (!web_contents->GetTopLevelNativeWindow())
+    return;
   validation_message_bubble_ =
           ->ShowValidationMessage(anchor_in_root_view, main_text, sub_text);