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 upwebidl: Implement sequences in unions #9304
Conversation
highfive
commented
Jan 14, 2016
| conversions.append(CGIfWrapper("value.get().is_object()", templateBody)) | ||
| elif arrayObject: | ||
| templateBody = CGList([arrayObject], "\n") | ||
| conversions.append(CGIfWrapper("value.get().is_object()", templateBody)) |
This comment has been minimized.
This comment has been minimized.
frewsxcv
Jan 14, 2016
Member
This line can be removed from both branches of the conditional since it's the same
This comment has been minimized.
This comment has been minimized.
frewsxcv
Jan 14, 2016
Member
Unless you did that thinking other object types might get added to the conditional
This comment has been minimized.
This comment has been minimized.
emilio
Jan 14, 2016
Author
Member
Yeah eventually other types might be added.
It seems to me that that line would be necessary in all of them though (we're inside of hasObjectTypes), so I'll take it out of the conditional.
|
r? @nox is probably a better bet at this point |
|
What happens if the type is -S-awaiting-review +S-awaiting-answer Reviewed 2 of 3 files at r1, 1 of 1 files at r2. Comments from the review on Reviewable.io |
|
Good catch! (it only generated code for the former). I fixed it, and also implemented I think the implementation is correct, but since you probably know better than I if root_from_handlevalue suits correctly there. |
That way it does not depend on the return value for the same type. This hopefully makes the code more clear, and avoids errors if something changes in the future (for example, we could want to pass slices as sequence arguments).
|
@Ms2ger Do we care about the |
|
Not sure. |
|
@nox Care about in what sense? We established that |
|
@bors-servo r+ @jdm Sure, but that is at odds with |
|
|
|
Related to |
webidl: Implement sequences in unions Unblocks #9053 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9304) <!-- Reviewable:end -->
|
|
|
@bors-servo p=2 force |
webidl: Implement sequences in unions Unblocks #9053 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9304) <!-- Reviewable:end -->
|
|
emilio commentedJan 14, 2016
Unblocks #9053