Closed Bug 1508576 Opened 6 years ago Closed 6 years ago

[wpt-sync] Sync PR 14140 - FormData: Fix a crash by passing null or non-HTMLFormElement instances to a FormData constructor

Categories

(Core :: DOM: Core & HTML, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 14140 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/14140
Details from upstream follow.

Kent Tamura <tkent@chromium.org> wrote:
>  FormData: 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/1343414
>  WPT-Export-Revision: 6f4bb9a383d5bc53c9b5ccc03eafb4172c762f44
Component: web-platform-tests → DOM
Product: Testing → Core
Ran 1 tests and 5 subtests
OK     : 1
PASS   : 5
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/02868188c96f
[wpt PR 14140] - FormData: Fix a crash by passing null or non-HTMLFormElement instances to a FormData constructor, a=testonly
https://hg.mozilla.org/mozilla-central/rev/02868188c96f
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.