Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWeb: Throw TypeError for new Headers(null) #2855

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

F3n67u
Copy link
Contributor

@F3n67u F3n67u commented Dec 9, 2024

The WebIDL for the Headers constructor specifies that the init parameter is optional and must be of type HeadersInit. While the parameter can be omitted (or explicitly set to undefined), null is not a valid value.

This change fixes at least 2 "Create headers with null should throw"
WPT subtests which I have imported in this patch.

@F3n67u F3n67u marked this pull request as ready for review December 9, 2024 20:28
The WebIDL for the `Headers` constructor specifies that the `init`
parameter is optional and must be of type `HeadersInit`. While the
parameter can be omitted (or explicitly set to `undefined`),
`null` is not a valid value.

This change fixes at least 2 "Create headers with null should throw"
WPT subtests which I have imported in this patch.
@F3n67u F3n67u force-pushed the headers-null-param branch from e2f47c3 to 690a27c Compare December 9, 2024 21:09
@trflynn89 trflynn89 merged commit f2eaf33 into LadybirdBrowser:master Dec 10, 2024
6 checks passed
@F3n67u F3n67u deleted the headers-null-param branch December 11, 2024 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants