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

Add safe `to_vec` for TypedArray wrapper #402

Merged
merged 1 commit into from Mar 22, 2018

Conversation

@Xanewok
Copy link
Contributor

Xanewok commented Mar 22, 2018

Also bumps the version to 0.3.2.

r? @jdm

Included the reasoning as to why it's safe as per our discussion on IRC.


This change is Reviewable

Also bumps the version to 0.3.2.
@jdm
Copy link
Member

jdm commented Mar 22, 2018

This seems like a useful API to make available.

@jdm
Copy link
Member

jdm commented Mar 22, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Mar 22, 2018

📌 Commit f47b2fb has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Mar 22, 2018

Testing commit f47b2fb with merge 4d1e448...

bors-servo added a commit that referenced this pull request Mar 22, 2018
Add safe `to_vec` for TypedArray wrapper

Also bumps the version to 0.3.2.

r? @jdm

Included the reasoning as to why it's safe as per our discussion on IRC.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-mozjs/402)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 22, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: jdm
Pushing 4d1e448 to master...

@bors-servo bors-servo merged commit f47b2fb into servo:master Mar 22, 2018
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
bors-servo added a commit to servo/servo that referenced this pull request Mar 23, 2018
Replace `object` function arguments in WebGL with typed arrays

<!-- Please describe your changes on the following line: -->

Could use a servo/rust-mozjs#402 in some places, as this should simplify a little bit and remove unnecessary `#[allow(unsafe_code)]` attributes.

I sort of hacked my way through for #20394 since I encountered this issue as well. I agree that the comment above makes me feel uneasy about this and feels like I'm missing something and this shouldn't be the way we eventually resolve the overloads with auto rootable types.

r? @jdm

---
<!-- 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 #20342 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because if the bindings compile now, it works!

<!-- 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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20396)
<!-- Reviewable:end -->
bors-servo added a commit to servo/servo that referenced this pull request Mar 23, 2018
Replace `object` function arguments in WebGL with typed arrays

<!-- Please describe your changes on the following line: -->

Could use a servo/rust-mozjs#402 in some places, as this should simplify a little bit and remove unnecessary `#[allow(unsafe_code)]` attributes.

I sort of hacked my way through for #20394 since I encountered this issue as well. I agree that the comment above makes me feel uneasy about this and feels like I'm missing something and this shouldn't be the way we eventually resolve the overloads with auto rootable types (talking about this: https://github.com/servo/servo/pull/20396/files#diff-60d01595cff328c165842fea9e4ccbc2R428).

r? @jdm

---
<!-- 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 #20342 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because if the bindings compile now, it works!

<!-- 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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20396)
<!-- Reviewable:end -->
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 24, 2018
…th typed arrays (from Xanewok:webgl-typed-arrays); r=jdm

<!-- Please describe your changes on the following line: -->

Could use a servo/rust-mozjs#402 in some places, as this should simplify a little bit and remove unnecessary `#[allow(unsafe_code)]` attributes.

I sort of hacked my way through for servo/servo#20394 since I encountered this issue as well. I agree that the comment above makes me feel uneasy about this and feels like I'm missing something and this shouldn't be the way we eventually resolve the overloads with auto rootable types (talking about this: https://github.com/servo/servo/pull/20396/files#diff-60d01595cff328c165842fea9e4ccbc2R428).

r? @jdm

---
<!-- 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 #20342 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because if the bindings compile now, it works!

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: e8fdc677f440919507209ed42d0ea042c700042c

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 9b2dfaed17d9383feffc8607235e52e97bb5953a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 2, 2019
…th typed arrays (from Xanewok:webgl-typed-arrays); r=jdm

<!-- Please describe your changes on the following line: -->

Could use a servo/rust-mozjs#402 in some places, as this should simplify a little bit and remove unnecessary `#[allow(unsafe_code)]` attributes.

I sort of hacked my way through for servo/servo#20394 since I encountered this issue as well. I agree that the comment above makes me feel uneasy about this and feels like I'm missing something and this shouldn't be the way we eventually resolve the overloads with auto rootable types (talking about this: https://github.com/servo/servo/pull/20396/files#diff-60d01595cff328c165842fea9e4ccbc2R428).

r? jdm

---
<!-- 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 #20342 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because if the bindings compile now, it works!

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: e8fdc677f440919507209ed42d0ea042c700042c

UltraBlame original commit: 54f62df7be63b37502d92155a27bc529f3600e8a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 2, 2019
…th typed arrays (from Xanewok:webgl-typed-arrays); r=jdm

<!-- Please describe your changes on the following line: -->

Could use a servo/rust-mozjs#402 in some places, as this should simplify a little bit and remove unnecessary `#[allow(unsafe_code)]` attributes.

I sort of hacked my way through for servo/servo#20394 since I encountered this issue as well. I agree that the comment above makes me feel uneasy about this and feels like I'm missing something and this shouldn't be the way we eventually resolve the overloads with auto rootable types (talking about this: https://github.com/servo/servo/pull/20396/files#diff-60d01595cff328c165842fea9e4ccbc2R428).

r? jdm

---
<!-- 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 #20342 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because if the bindings compile now, it works!

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: e8fdc677f440919507209ed42d0ea042c700042c

UltraBlame original commit: 54f62df7be63b37502d92155a27bc529f3600e8a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 2, 2019
…th typed arrays (from Xanewok:webgl-typed-arrays); r=jdm

<!-- Please describe your changes on the following line: -->

Could use a servo/rust-mozjs#402 in some places, as this should simplify a little bit and remove unnecessary `#[allow(unsafe_code)]` attributes.

I sort of hacked my way through for servo/servo#20394 since I encountered this issue as well. I agree that the comment above makes me feel uneasy about this and feels like I'm missing something and this shouldn't be the way we eventually resolve the overloads with auto rootable types (talking about this: https://github.com/servo/servo/pull/20396/files#diff-60d01595cff328c165842fea9e4ccbc2R428).

r? jdm

---
<!-- 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 #20342 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because if the bindings compile now, it works!

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: e8fdc677f440919507209ed42d0ea042c700042c

UltraBlame original commit: 54f62df7be63b37502d92155a27bc529f3600e8a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

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