Closed Bug 1806169 Opened 1 year ago Closed 1 year ago

Switch more invocations of JS parser to use UTF-8 parser

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

Now that we have UTF-8 JS parsing support, the char16_t should be deprecated. Numerous loaders in gecko decode from streams and then parse to JS. This bug is about switching those cases to decode into UTF8 before parsing. These cases already required well-formed UTF16, so using UTF8 as the target instead is can be done without further information loss.

Similar to the ConvertToUTF16 overload for JS owned strings, add an overload for
the UTF8 case. This simplifies later work to switch parsing to UTF8.

Depends on D164933

Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/300945b39f81
Add ScriptLoader::ConvertToUTF8 overload r=jonco
https://hg.mozilla.org/integration/autoland/rev/0df4af33a26e
Use UTF8 JS parser for PrototypeDocumentContentSink r=hsivonen
https://hg.mozilla.org/integration/autoland/rev/089548c43a16
Use UTF8 JS parser for nsFrameMessageManager r=hsivonen
https://hg.mozilla.org/integration/autoland/rev/3bdaef5f3363
Use UTF8 JS parser for ChromeScriptLoader r=hsivonen
https://hg.mozilla.org/integration/autoland/rev/0734671d309a
Use UTF8 parser for Worklet code r=hsivonen
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: