Skip to content

fix: webidl.brandcheck non strict should throw#2683

Merged
mcollina merged 7 commits intonodejs:mainfrom
Uzlopak:fix-webidl-brandcheck
Feb 5, 2024
Merged

fix: webidl.brandcheck non strict should throw#2683
mcollina merged 7 commits intonodejs:mainfrom
Uzlopak:fix-webidl-brandcheck

Conversation

@Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Feb 1, 2024

It is very strange, that in case of strict: false brandCheck would not throw, but in strict cases it would throw.

We use the non strict brandCheck e.g.

webidl.brandCheck(headers, Headers, { strict: false })

The non strict check is basically a no op, as nothing happens with the result. I assume this was just an oversight.

I would actually recommend for performance reasons to implement a webidl.brandCheckLax (or something like that) and make webidl.brandCheck only handle strict cases.

This relates to...

Rationale

Changes

Features

Bug Fixes

Breaking Changes and Deprecations

Status

Loading
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.

4 participants