Closed Bug 1804086 Opened 3 years ago Closed 3 years ago

Make sure the content we passed to the Javascript parser in the Utility Process are utf-8 encoded for ORB

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: sefeng211, Assigned: sefeng211)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Whiteboard: [orb:m2], [wptsync upstream])

Attachments

(3 external files)

For ORB, we need to ensure the content that we are passing to the JS parser are utf-8 encoded.

Severity: S3 → --

It probably makes sense to start with a manually-monomorphized copypaste of what ScriptLoader::ConvertToUTF8 expands to. Perhaps the ORB and ScriptLoader code paths can be refactored back together later. The strangest bit there is the case where aDocument is null. I don't recall when that occurs, but it falls back to windows-1252.

I wonder if Document::GetDocumentCharacterSet() is something we should expose on WindowContext.

Summary: Make sure the content we passed to the Javascript parser are utf-8 encoded → Make sure the content we passed to the Javascript parser in the Utility Process are utf-8 encoded for ORB
Depends on: 1817041
Whiteboard: [orb:m2] → [orb:m2][sp3]

This is needed for doing content decoding for ORB.

Assignee: nobody → sefeng
Status: NEW → ASSIGNED

This is needed for doing content decoding for ORB.

Depends on D172490

Attachment #9322846 - Attachment description: Bug 1804086 - Make JSValidatorChild decoding the data from other decoding into UTF8 if needed r=farre,smaug → Bug 1804086 - Make JSValidatorChild decoding the data from other encoding into UTF8 if needed r=farre,smaug
Whiteboard: [orb:m2][sp3] → [orb:m2]
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/00feb14e7824 Allow classic script hint to be passed from content to parent r=smaug,necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/1bea9ea5e20d Allow document charset to be passed from content to parent r=smaug,necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/12a40a80a975 Make JSValidatorChild decoding the data from other encoding into UTF8 if needed r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/39129 for changes under testing/web-platform/tests
Whiteboard: [orb:m2] → [orb:m2], [wptsync upstream]
Upstream PR was closed without merging
Flags: needinfo?(sefeng)
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b86f3d846ada Allow classic script hint to be passed from content to parent r=smaug,necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/d5948770d0a1 Allow document charset to be passed from content to parent r=smaug,necko-reviewers,kershaw https://hg.mozilla.org/integration/autoland/rev/0b351d3ec6c6 Make JSValidatorChild decoding the data from other encoding into UTF8 if needed r=smaug
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: