Directly compile UTF-8 JS without inflating, for UTF-8 scripts in web pages
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox68 | --- | affected |
People
(Reporter: Waldo, Unassigned)
References
(Depends on 1 open bug)
Details
Most of the JS engine changes for direct parsing/compilation of UTF-8 are done. (At least in the synchronous compile/evaluate cases. Off-thread parsing will require a couple more additions, albeit likely uncomplicated ones.) Bug 1543455 and bug 1543458 begin to convert over purely internal users that never process potentially-hostile web JS. Bug 1543498 converts over a not-internal user, that is exposed to scripts we don't control but are still relatively constrained (user-provided, not web-provided).
The final bit of exposure is to compile scripts on the web directly from UTF-8: scripts embedded directly in webpages (if our DOM representation uses UTF-8 to store the script text -- it may well not), scripts at URLs referenced in script elements, and worker scripts.
We'll want to use UTF-8 compilation for these scripts incrementally: first enabling in nightly/beta for these, then enabling in release -- and maybe split that up in nightly/beta so workers and scripts get UTF-8 compilation at separate times, underneath (temporary) separate preferences.
The sum observable effect of all this, from webpages' point of view, should be nothing. But a lot of different code is going to suddenly be executed as this switch happens -- subtly different code -- so a cautious approach seems appropriate.
Comment 1•7 years ago
|
||
(In reply to Jeff Walden [:Waldo] from comment #0)
(if our DOM representation uses UTF-8 to store the script text -- it may well not)
The DOM stores inline scripts as UTF-16 or Latin1--never UTF-8. Bug 1543693 will introduce direct Latin1 to UTF-8 conversion that shares the nsStringBuffer if there is one and it's ASCII-only.
Updated•6 years ago
|
Comment 2•4 years ago
|
||
The bug assignee didn't login in Bugzilla in the last months and this bug has priority 'P2'.
:hsinyi, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•4 years ago
|
Updated•3 years ago
|
Description
•