Closed Bug 1922050 Opened 11 months ago Closed 9 months ago

ThirdPartyUtil::GetBaseDomainFromSchemeHost should check if the scheme is "file"

Categories

(Core :: Networking, task, P2)

task

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: edgul, Assigned: edgul)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

ThirdPartyUtil::GetBaseDomainFromSchemeHost should check if the scheme is "file".
If it is then call aBaseDomain.Truncate(), otherwise check if the base domain is empty and return an error if so.
https://searchfox.org/mozilla-central/rev/4cef3cd672243f7ae6d46103ca0ea7b253a74484/dom/base/ThirdPartyUtil.cpp#468-470

Severity: -- → N/A
Priority: -- → P2
Whiteboard: [necko-triaged]

I was looking for the best way to add a test for this function, but noticed we only have one caller of this function: https://searchfox.org/mozilla-central/rev/691fb5ba2d1022cfe3fdc7b68e9460395c792300/netwerk/base/mozurl/src/lib.rs#345

and maybe this function shouldn't need to exist anymore?
https://searchfox.org/mozilla-central/rev/691fb5ba2d1022cfe3fdc7b68e9460395c792300/netwerk/base/mozIThirdPartyUtil.idl#167-168

An alternative might remove this method and use whichever one that was added as a replacement in Bug 922464.

Valentin, any thoughts?

Flags: needinfo?(valentin.gosu)

I think we can remove it along with mozurl_base_domain and the callsites in the gtest

Flags: needinfo?(valentin.gosu)
Assignee: nobody → edgul
Status: NEW → ASSIGNED
Pushed by eguloien@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/390c9d9ac548 Removed unused GetBaseDomainFromSchemeHost from thirdparty util r=valentin,necko-reviewers
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: