Closed Bug 1839920 Opened 2 years ago Closed 2 years ago

Rename GetASCIIOrigin and GetUTFOrigin to GetWHATWGOrigin

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: nika, Assigned: nika)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We currently have two different concepts of "origin" which we use in Gecko associated with a nsIPrincipal. One is the origin which is a unique internal string conceptually corresponding 1:1 with a nsIPrincipal's access rights, and the other is the asciiOrigin, which returns the origin string according to the WHATWG URL specificiation. This string is formatted differently, leaves out internal information like containers, and returns the string "null" for more types of URLs.

We should rename GetASCIIOrigin and GetUTFOrigin to make it more clear which origin they correspond to in new code, and to avoid folks using these origins when they want to be using nsIPrincipal::Origin and vice-versa.

This should make uses of the type more clearly indicating where the
origin came from, and should help avoid potential confusion between this
origin and nsIPrincipal::origin in new code.

Attachment #9340541 - Attachment description: Bug 1839920 - Rename Get{ASCII,UTF}Origin to GetWHATWGOrigin, r=smaug! → Bug 1839920 - Rename Get{ASCII,UTF}Origin to GetWebExposedOriginSerialization, r=smaug!
Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fd545a8b6f9a Rename Get{ASCII,UTF}Origin to GetWebExposedOriginSerialization, r=smaug,necko-reviewers,anti-tracking-reviewers,bvandersloot,jesup
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: