Open Bug 1818776 Opened 2 years ago Updated 1 year ago

Normalize to use of nsIURI instead of strings inside `openLinkIn` and things it calls

Categories

(Firefox :: General, task, P1)

Desktop
All
task

Tracking

()

Tracking Status
firefox112 --- affected

People

(Reporter: Gijs, Assigned: Gijs)

References

(Depends on 1 open bug)

Details

After bug 1817443 the natural next step to work towards using bug 1810141 for most of the loads we do is to change openLinkIn so it can take nsIURIs and/or DOM URL objects.

Fundamentally openLinkIn can load URLs in one of three places:

  1. current tab
  2. new tab
  3. new window

Although the fixupAndLoadURIString is in the new URILoadingHelper for (1), for (2) and (3) the loads happen elsewhere, so I'll split those call paths out to separate bugs, and those will want to be fixed first. However, to avoid duplication, the logic for going from a string to an nsIURI will probably want to be inside URILoadingHelper, so various callers can easily access it.

It's worth noting that a few other utilities (notably E10sUtils) are currently also geared towards strings (and do their own parsing of URLs...), so I'll probably have to update some of them to make them easier to use with URI objects, too (rather than generating lots of strings from uri.spec that then get reparsed etc.).

Depends on: 1818777
Severity: -- → N/A
Priority: -- → P1
Type: defect → task
Depends on: 1819728

The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Networking
Product: Firefox → Core
Component: Networking → General
Product: Core → Firefox
You need to log in before you can comment on or make changes to this bug.