Skip to content
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

Vec<Temporary<T>> is unsafe #4107

Closed
jdm opened this issue Nov 26, 2014 · 3 comments
Closed

Vec<Temporary<T>> is unsafe #4107

jdm opened this issue Nov 26, 2014 · 3 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Nov 26, 2014

It looks appealing, but Temporary<T> only works on the stack. There's only one instance of this right now - AttributeHandlers::get_attributes.

@Manishearth
Copy link
Member

@Manishearth Manishearth commented Nov 26, 2014

This is easy to lint.

How are we supposed to return a list of elements, though?

@jdm
Copy link
Member Author

@jdm jdm commented Nov 26, 2014

The only solution I've come up with so far is a WebIDL-based JSVec<T> that is equivalent to NodeList but for all Reflectable elements. Unfortunately I suspect our codegen could have problems with the type parameter.

@nox nox added the C-duplicate label Jun 12, 2015
@nox
Copy link
Member

@nox nox commented Jun 12, 2015

Duplicate of #4335.

@nox nox closed this Jun 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.