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

Rewrite TextEncoder::Encode to use typed array API #15504

Closed
jdm opened this issue Feb 11, 2017 · 3 comments
Closed

Rewrite TextEncoder::Encode to use typed array API #15504

jdm opened this issue Feb 11, 2017 · 3 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Feb 11, 2017

The current implementation uses the JSAPI to create an array buffer, get its buffer and populate it with the encoded text. We should be using the ArrayBuffer::create API instead (see FileReader::perform_readasarraybuffer for an example).

Code: components/script/dom/textencoder.rs
Tests: ./mach test-wpt tests/wpt/encoding/

@highfive
Copy link

@highfive highfive commented Feb 11, 2017

Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the #servo channel in IRC.

If you intend to work on this issue, then add @highfive: assign me to your comment, and I'll assign this to you. 😄

@absoludity
Copy link
Contributor

@absoludity absoludity commented Feb 11, 2017

@highfive: assign me

@highfive highfive added the C-assigned label Feb 11, 2017
@highfive
Copy link

@highfive highfive commented Feb 11, 2017

Hey @absoludity! Thanks for your interest in working on this issue. It's now assigned to you!

absoludity added a commit to absoludity/servo that referenced this issue Feb 11, 2017
absoludity added a commit to absoludity/servo that referenced this issue Feb 12, 2017
bors-servo added a commit that referenced this issue Feb 12, 2017
Rewrite TextEncoder::Encode to use typed array API. Fixes #15504

<!-- Please describe your changes on the following line: -->
Rewrite TextEncoder::Encode to use typed array API. Fixes #15504

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because the existing tests ensure the behaviour has not changed - `./mach test-wpt tests/wpt/web-platform-tests/encoding`

<!-- 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/15510)
<!-- Reviewable:end -->
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.

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