Closed Bug 2016849 Opened 6 months ago Closed 5 months ago

Refactor baseUrl defaults from null to undefined across security layer URL callchain

Categories

(Core :: Machine Learning: General, task)

task

Tracking

()

RESOLVED WONTFIX

People

(Reporter: rconcepcion, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [genai])

The following methods methods in the security layer default baseUrl to null.:

  • normalizeUrl
  • TabLedger.seed
  • TabLedger.has
  • TabLedger.add

Due to this, the security layer uses a ternary guard in normalizeUrl because URL.parse(urlString, null) returns null even for valid URLs.
If the callchain used undefined instead of null, the second argument would simply be omitted naturally and the ternary would be unnecessary:

const url = URL.parse(urlString, baseUrl);

Acceptance Criteria:

  • All baseUrl parameters in the security callchain default to undefined and the ternary guard in normalizeUrl is removed
  • Existing tests continue to pass

This is being removed in Bug 2029729.

Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.