Closed Bug 1553502 Opened 5 years ago Closed 5 years ago

Compile DOM worker scripts directly from UTF-8, behind a pref

Categories

(Core :: DOM: Workers, task, P3)

task

Tracking

()

RESOLVED FIXED
Tracking Status
firefox69 --- affected

People

(Reporter: Waldo, Assigned: Waldo)

References

Details

Attachments

(4 files)

Worker scripts are UTF-8 when downloaded, and read from cache they're UTF-8 as well, so theoretically this is like a two-line change. Which makes it a nice testcase for UTF-8 compilation early on.

I have patches that get us to compiling using JSAPI compile-UTF-8 entrypoints (...that still inflate to UTF-16 internally) that still have some issues. But I doubt I'm far at this point from resolving those issues, then taking the further step of using the compile-UTF-8-directly entrypoints.

Blocks: 1543517
Component: JavaScript Engine → DOM: Workers
Summary: Compile DOM worker scripts directly from UTF-8 → Compile DOM worker scripts directly from UTF-8, behind a pref

https://treeherder.mozilla.org/#/jobs?repo=try&revision=4a5303035ce25de2e5bd8e82224ef029ebfb6be5 for a try-run of essentially these patches (and some other bugwork some of which prerequisite to these patches).

Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f43362b707d4
Add a preference to (...eventually) control whether DOM worker scripts are compiled directly from UTF-8 without inflating.  r=bzbarsky

(landing the pref alone in advance of everything else, touching and untouching StaticPrefList.h is a wonderful way to clobber every stupid time)

Keywords: leave-open
Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/autoland/rev/1337df4d9d11
Implement ScriptLoader::ConvertToUTF8.  r=bzbarsky
https://hg.mozilla.org/integration/autoland/rev/20f03bc56440
Make DOM workers' ScriptLoadInfo class use member initializers instead of performing the same initializations in the constructor, for greater readability.  r=bzbarsky
https://hg.mozilla.org/integration/autoland/rev/492f35b04474
Allow DOM workers' ScriptLoadInfo to store and evaluate either UTF-8 or UTF-16 data, depending whether dom.worker.script_loader.utf8_parsing.enabled is true.  r=bzbarsky
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: leave-open
Resolution: --- → FIXED
Regressions: 1559633
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: