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

Test if AbortController and AbortSignal perform brand checks #28092

Conversation

MattiasBuelens
Copy link
Contributor

The properties and methods on these interfaces should perform a brand check on their receiver (as required by Web IDL). However, this is currently untested, since the IDL harness doesn't know how to call an interface method. This makes them easy to miss for implementors, such as in nodejs/node#37720.

This PR adds tests for these brand checks. These are upstreamed from nodejs/node#37720, which in turn are based on these WPT tests for Streams.

@domenic
Copy link
Member

domenic commented Mar 16, 2021

This is already tested in http://wpt.live/dom/idlharness.any.worker.html (and non-worker variants)

@MattiasBuelens
Copy link
Contributor Author

Ah, I see now. In do_member_operation_asserts and do_interface_attribute_asserts, the IDL harness tries to call the method/getter on an empty object ({}). So it does know how to call a method, it even constructs some arguments for the call! 😮

My apologies. I'll tell the Node people to actually run the IDL harness tests. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants