mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1704660, add a null check for a CreateStringBlob caller, r=edgar
The form isn't submitted to the server because https://searchfox.org/mozilla-central/rev/3de2db87f3c9001ae478318d47a2ca3427574382/docshell/base/nsDocShell.cpp#12834 returns early. Differential Revision: https://phabricator.services.mozilla.com/D111852
This commit is contained in:
parent
7c91c2efa6
commit
20de573529
@ -5682,6 +5682,7 @@ HTMLInputElement::SubmitNamesValues(HTMLFormSubmission* aFormSubmission) {
|
||||
GetFilesOrDirectoriesInternal();
|
||||
|
||||
if (files.IsEmpty()) {
|
||||
NS_ENSURE_STATE(GetOwnerGlobal());
|
||||
ErrorResult rv;
|
||||
RefPtr<Blob> blob = Blob::CreateStringBlob(
|
||||
GetOwnerGlobal(), ""_ns, u"application/octet-stream"_ns);
|
||||
|
17
dom/html/crashtests/1704660.html
Normal file
17
dom/html/crashtests/1704660.html
Normal file
@ -0,0 +1,17 @@
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
function test() {
|
||||
var ifr = document.getElementsByTagName("iframe")[0];
|
||||
var form = ifr.contentDocument.getElementsByTagName("form")[0];
|
||||
form.onsubmit = function() {
|
||||
ifr.remove()
|
||||
}
|
||||
form.lastChild.click();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="test()">
|
||||
<iframe srcdoc="<form><input name=f type=file><button></button></form>"></iframe>
|
||||
</body>
|
||||
</html>
|
@ -90,3 +90,4 @@ load 1550881-1.html
|
||||
load 1550881-2.html
|
||||
skip-if(Android) pref(dom.disable_open_during_load,false) load 1667493.html
|
||||
load 1680418.html
|
||||
load 1704660.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user