Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd webidl annotation to pass InCompartment argument to DOM methods #23257
Comments
|
It's easiest to start small here - make the fetch method from Window.webidl take an InCompartment object, and adjust the code generation until everything lines up. |
|
Should all the methods asserting |
|
That's the idea behind this work, yes. |
bors-servo
added a commit
that referenced
this issue
Jun 2, 2019
Add an inCompartments config option for bindings Fixes #23257 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23459) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on the work in #23253:
Let's add a new
in_compartmentproperty to this configuration - for a given interface, this property will be a list of method/property names that expect to receiveInCompartmentarguments.We will need to store this
in_compartmentin this code so we can query it later during code generation.The easiest place to start is with methods in this code. We can treat this similarly to deciding whether to provide a
*mut JSContextargument or not, by making the caller tell us whether this is a method that should provide an InCompartment argument or not.