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 upUse UTF-8 versions of Compile/Execute for scripts #27331
Comments
|
@highfive:assignme |
|
@jdm Maybe this would be an interesting challenge to take on! |
|
@jdm Can you tell me a little more about the issue? I'm assuming you don't mean going through every script and changing the encoding to UTF-8. |
|
@avr1254 In servo/components/script/dom/htmlscriptelement.rs Lines 451 to 456 in 5a8023d servo/components/script/dom/globalscope.rs Lines 2606 to 2610 in 5a8023d https://doc.servo.org/mozjs/jsapi/fn.Compile1.html |
|
@jdm Isn't the second example already using UTF-8 instead of UTF-16? |
|
You're right! |
|
Aha, here's the other case that I was thinking of: servo/components/script/script_module.rs Lines 433 to 437 in c7bdb1b |
Removed unnecessary conversion from UTF-8 to UTF-16 <!-- Please describe your changes on the following line: --> Changed Spidermonkey API calls to remove need for UTF-16 conversion. --- <!-- 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 #27331 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because they simply optimize existing code for speed. <!-- 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. -->
This will avoid having to encode them as UTF-16 first.