Skip to content

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.

@wpt-pr-bot wpt-pr-bot added the dom label Mar 16, 2021
@wpt-pr-bot wpt-pr-bot requested review from annevk, jdm and zqzhang March 16, 2021 00:46
@MattiasBuelens MattiasBuelens force-pushed the abort-controller-brand-checks branch from 82ca4f6 to 004da61 Compare March 16, 2021 00:46
@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