Index: third_party/WebKit/Source/core/html/HTMLFormElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp |
index c7383329660c994d10e0b8fe301908d6b9c3fec5..a5326a730d96102525617237f3f442fb3817d5db 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLFormElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLFormElement.cpp |
@@ -286,6 +286,13 @@ void HTMLFormElement::PrepareForSubmission( |
if (!frame || is_submitting_ || in_user_js_submit_event_) |
return; |
+ if (!isConnected()) { |
+ GetDocument().AddConsoleMessage(ConsoleMessage::Create( |
+ kJSMessageSource, kWarningMessageLevel, |
+ "Form submission canceled because the form is not connected")); |
+ return; |
+ } |
+ |
if (GetDocument().IsSandboxed(kSandboxForms)) { |
GetDocument().AddConsoleMessage(ConsoleMessage::Create( |
kSecurityMessageSource, kErrorMessageLevel, |