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 upSupport IDL stringifier attributes #24544
Conversation
highfive
commented
Oct 25, 2019
|
Heads up! This PR modifies the following files:
|
|
@bors-servo try=wpt |
Support IDL stringifier attributes <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [x] These changes fix #7590 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| @@ -21,9 +21,8 @@ interface DOMTokenList { | |||
| [CEReactions, Throws] | |||
| void replace(DOMString token, DOMString newToken); | |||
|
|
|||
| [CEReactions, Pure] | |||
| attribute DOMString value; | |||
| [CEReactions] | |||
This comment has been minimized.
This comment has been minimized.
saschanaz
Oct 25, 2019
Author
Contributor
Removed Pure because WebIDL.py currently does not allow it on stringifier attribute (just because gecko didn't have it on any of its stringifier attributes).
The support can be added, but not sure why servo has Pure but gecko does not. @nox, could you give me some idea?
This comment has been minimized.
This comment has been minimized.
nox
Oct 25, 2019
Member
https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings
[Pure]This is an alias for
[Affects=Nothing, DependsOn=DOMState]. Attributes/methods flagged in this way promise that they will keep returning the same value as long as nothing that has[Affects=Everything]executes.
This comment has been minimized.
This comment has been minimized.
saschanaz
Oct 25, 2019
Author
Contributor
Thanks for the docs, but I mean why DOMTokenList in Gecko does not have Pure.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
nox
Oct 25, 2019
Member
No clue, I don't know if that conflicts with how stringifiers are handled through SpiderMonkey. Or it could be a case of no one adding support for [Pure] on them in the Gecko side.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
jdm
Oct 25, 2019
Member
I'm not actually confident that Pure has any meaning in Servo's implementation. It may have been copied from upstream webidl in Gecko.
This comment has been minimized.
This comment has been minimized.
nox
Oct 25, 2019
Member
I'm not actually confident that Pure has any meaning in Servo's implementation. It may have been copied from upstream webidl in Gecko.
WebIDL.py translates [Pure] and [Constant] to specific [Affects]/[DependsOn] combinations, and you can actually find references to those in CodegenRust.py.
This comment has been minimized.
This comment has been minimized.
nox
Oct 25, 2019
Member
(Submitted too fast.)
And in #7601 I went out of my way to make use of them more extensively so those weren't there by coincidence.
This comment has been minimized.
This comment has been minimized.
bzbarsky
Oct 25, 2019
Contributor
Fwiw, I think we should add support for [Pure] in the parser here and probably add it in the Gecko IDL.
|
|
|
Where do the WebIDL parser and tests changes come from? Upstream? If not, you are not supposed to change those files. |
|
|
Cool. Then please make a first commit with the vendoring of those new changes (with the |
|
@bors-servo try=wpt |
Support IDL stringifier attributes <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #7590 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
|
@bors-servo try=wpt |
Support IDL stringifier attributes <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #7590 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
|
@bors-servo r=nox,jdm |
|
|
Support IDL stringifier attributes <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #7590 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
|
@bors-servo retry |
|
|
Support IDL stringifier attributes <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #7590 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
saschanaz commentedOct 25, 2019
•
edited
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors