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 TypedArray API using Heap-wrapped objects #397

Merged
merged 3 commits into from Mar 13, 2018

Conversation

@Xanewok
Copy link
Contributor

Xanewok commented Mar 13, 2018

Needed for servo/servo#20267.

This changes TypedArray wrapper type to only contain typed array-related logic and not handle rooting, and introduces 2 different possible storage options for wrapped objects

  • *mut JSObject, can be rooted on stack (e.g. using CustomAutoRooter)
  • Box<Heap<*mut JSObject>>, can be rooted on heap with JSTraceable trait (implemented on Servo side)

Since the API changes are breaking, I bumped minor version so that Servo will not break when updating.

r? @jdm


This change is Reviewable

Xanewok added 3 commits Mar 8, 2018
Bumping major version since changes to TypedArray API are breaking
@jdm
Copy link
Member

jdm commented Mar 13, 2018

@bors-servo r+
Thanks for working on this!

@bors-servo
Copy link
Contributor

bors-servo commented Mar 13, 2018

📌 Commit eef813b has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Mar 13, 2018

Testing commit eef813b with merge d2a3ed6...

bors-servo added a commit that referenced this pull request Mar 13, 2018
Add TypedArray API using Heap-wrapped objects

Needed for servo/servo#20267.

This changes TypedArray wrapper type to only contain typed array-related logic and not handle rooting, and introduces 2 different possible storage options for wrapped objects
- `*mut JSObject`, can be rooted on stack (e.g. using CustomAutoRooter)
-  `Box<Heap<*mut JSObject>>`, can be rooted on heap with `JSTraceable` trait (implemented on Servo side)

Since the API changes are breaking, I bumped minor version so that Servo will not break when updating.

r? @jdm

<!-- 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/397)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Mar 13, 2018

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

@bors-servo bors-servo merged commit eef813b into servo:master Mar 13, 2018
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
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.