Closed Bug 2040758 Opened 6 months ago Closed 5 months ago

Clean up xpi content handling

Categories

(Toolkit :: Add-ons Manager, task, P2)

task

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox153 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

Details

(Whiteboard: [addons-jira])

Attachments

(3 external files)

xpi content handling is more complicated than it needs to be, mainly for historical reasons.

Although the InstallTrigger implementation was removed (bug 1776426), there is still some dead code. We can also put the handler in the parent and remove _handleUriInChrome (originally introduced in bug 1175267) and perhaps also this special exception for null principals (note: relevant bug for unit test is at bug 2014500).

The code surrounding that null principal check also includes several aBrowser && checks. These were introduced in the first patch of bug 1599580, and used in the last patch of it. But that implementation has since changed (by bug 1866906), so these null checks are no longer needed.

Drop dead code and move remaining logic to parent.

browser_localfile.js already covers the behavior, but one scenario was
missing, so I added browser_localfile_navigation.js for completeness.

Make the aBrowser option required again, undoing bug 1599580.
The test_installOrigins.js was the only consumer, modify test to
use real browsers with the given principal.

Also remove the isNullPrincipal check and comment, as we handle XPI
loads in the parent.

Severity: -- → N/A
Priority: -- → P2
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
QA Whiteboard: [qa-triage-done-c154/b153]
Regressions: 2048964
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: