Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRewrite TextEncoder::Encode to use typed array API #15504
Closed
Labels
Comments
|
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the If you intend to work on this issue, then add |
|
@highfive: assign me |
|
Hey @absoludity! Thanks for your interest in working on this issue. It's now assigned to you! |
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
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.rsTests:
./mach test-wpt tests/wpt/encoding/