Closed Bug 1708239 Opened 5 years ago Closed 5 years ago

addons/Content.js should not be loaded as a framescript

Categories

(WebExtensions :: General, task)

task

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1708193

People

(Reporter: nika, Unassigned)

Details

Currently the resource://gre/modules/addons/Content.js script (https://searchfox.org/mozilla-central/rev/3aef835f6cb12e607154d56d68726767172571e4/toolkit/mozapps/extensions/internal/Content.js) is loaded as a frame script in all frames (https://searchfox.org/mozilla-central/rev/3aef835f6cb12e607154d56d68726767172571e4/toolkit/mozapps/extensions/addonManager.js#60), however the listeners it registers only act on a per-process level, and need not be installed per-frame. This script should instead be loaded either as a process script, or the functionality should be moved into some other component.

As far as I can tell, the only use of the script is in XPIInstall.jsm where a message is sent to every frame to be re-broadcast in each content process: https://searchfox.org/mozilla-central/rev/3aef835f6cb12e607154d56d68726767172571e4/toolkit/mozapps/extensions/internal/XPIInstall.jsm#182

Thanks Nika, I filed the same thing hours ago! :)

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