Bug 1508576 [wpt PR 14140] - FormData: Fix a crash by passing null or non-HTMLFormEle...
commit65fe01fee635a80bbfc7592f0635003c3965493f
authorKent Tamura <tkent@chromium.org>
Thu, 22 Nov 2018 10:34:30 +0000 (22 10:34 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Fri, 23 Nov 2018 18:36:50 +0000 (23 18:36 +0000)
tree35b14ae71b896da52b2fb78b795c5c6de8860933
parenta7f7f006b448687393b2cb0e42d7182ab35cdcb7
Bug 1508576 [wpt PR 14140] - FormData: Fix a crash by passing null or non-HTMLFormElement instances to a FormData constructor, a=testonly

Automatic update from web-platform-testsFormData: Fix a crash by passing null or non-HTMLFormElement instances to a FormData constructor

Add back nullptr check to FormData::Create(HTMLFormElement*).

This CL fixes a regression caused by crrev.com/609210.
According to standards, |new FormData(nullptr)| and |new
FormData("string")| should throw TypeErrors. However this CL applies the
behavior before crrev.com/609210.

Bug: 906649
Change-Id: I78aa53559592ef0e14cc941175dc9f1b44342bb0
Reviewed-on: https://chromium-review.googlesource.com/c/1343414
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609614}

--

wpt-commits: 3e5c53caa5517b2940f0e49441021cac78a84042
wpt-pr: 14140
testing/web-platform/tests/xhr/formdata.htm