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
NamedGetter
and NamedSetter
codegen assumes parameter named name
#2240
Comments
So the issue is that we have
|
Ah, thanks, yeah that's definitely it. It looks like that fix didn't make it into servo? |
Yeah. Shouldn't be too hard to port the changes there, though. |
I'd like to work on this. Because there's Mozilla's code that I can use as reference, I think I can do it. |
Running |
Okay, cool. I am on it. |
…ed 'name'. [Issue servo#2240]
@Ms2ger Here is what I have done so far. No build errors. I re-built and ran the test using
|
@Ms2ger Should I go ahead and do pull?! |
@Dhananjay92 Those changes aren't quite right; you want to modify dom/webidls/TestCodeGen.webidl instead of the one you did, and there's no point in modifying the C++ header - it's just left over from when I imported the code generation implementation from Firefox. |
@Dhananjay92, are you still working on this? |
@klusark Nope, not any more. Would love to, but I have very less time. You can take it. 😃 |
I'll try and work on this. |
I'll need some handholding, though, as I'm not familiar with Servo yet. Do I understand correctly that the changes done by @Dhananjay92 on the Python file are correct and that I need to implement his interface |
I believe the python changes are correct, but the test-related changes are incorrect. Servo doesn't use any of those files. |
… argument is named `name`
… argument is named `name`
… argument is named `name`
… argument is named `name`
Fixes #2240 - NamedGetter and NamedSetter do not assume that the arg is named `name` I'm not totally sure about how to test this. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7387) <!-- Reviewable:end -->
I ran into this while looking into #2117. A few places dealing with
NamedGetter
andNamedSetter
inCodeGenRust.py
explicitly define a variablename
(example) while the name of the parameter that actually gets passed is defined in the webidl. It seems like currently onlyHTMLCollection
is using this functionality, and things work because the getter in its webidl hasname
as the parameter name. But the Storage webidl useskey
as the parameter name.The quick fix is to just change the webidl to use
name
, but I thought I'd file an issue, because this is confusing.The text was updated successfully, but these errors were encountered: