You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error in generated binding for variadic argument of type that needs rooting #8159
DocumentBinding.rs:2184:61: 2184:64 error: no method named `r` found for type `collections::vec::Vec<dom::bindings::js::Root<dom::touch::Touch>>` in the current scope
DocumentBinding.rs:2184 let result: Root<TouchList> = this.CreateTouchList(arg0.r());
^~~
This is probably because CGPerSignatureCall.getArguments doesn't check whether the argument is variadic. I suspect adding that check would fix this (but note the duplicated code in CGProxySpecialOperation.getArguments).
Activity
Ms2ger commentedon Oct 23, 2015
This is probably because
CGPerSignatureCall.getArgumentsdoesn't check whether the argument is variadic. I suspect adding that check would fix this (but note the duplicated code inCGProxySpecialOperation.getArguments).nox commentedon Oct 25, 2015
I would rather make it pass
&[&T]instead of just removing that.r()call, no?Ms2ger commentedon Oct 25, 2015
I guess a
Vec<Root<T>>is useless anyway. We could go either way.nox commentedon Oct 25, 2015
Sounds like making the proper thing (
&[&T]) is more complex than just removing the.r()call, for now.nox commentedon Oct 25, 2015
Especially because I think the
RootedVec::new()then needs to be moved outside the block that definesarg0, so that it doesn't end up moved.nox commentedon Oct 25, 2015
So I managed to get the code to compile:
But I'm pretty sure this will fail at runtime when the RootedVec is dropped. Will write a test.
nox commentedon Oct 25, 2015
Yes, this panics.
Support variadic interface arguments (fixes servo#8159)
Support variadic interface arguments (fixes servo#8159)
Support variadic interface arguments (fixes servo#8159)
Support variadic interface arguments (fixes servo#8159)
Auto merge of #8197 - nox:variadic-interface-argument, r=jdm