Skip to content

Thunderbird 155 breaks packaged script loading via WindowListener and Services.scriptloader.loadSubScript() #385

Description

@RealRaven2000

Summary

Thunderbird 155 blocks jar:/file: URLs passed to
Services.scriptloader.loadSubScript(), breaking legacy add-ons that use the
WindowListener Experiment to inject chrome-window scripts.

Upstream reference: Mozilla Bug 2061809.

Impact

quickFilters cannot load WindowListener-managed scripts from its packaged XPI,
including scripts registered with:

  • registerDefaultPrefs()
  • registerWindow()
  • startup script loading
  • shutdown script loading

This also affects direct calls to Services.scriptloader.loadSubScript() when the script URL resolves to a packaged jar:/file: URI - including all chrome:// scripts. WindowListener is one widely used abstraction that exposes the breakage.

The same patterns are used by QuickFolders, SmartTemplates, and FiltaQuilla.

Proposed short-term fix

Keep the existing WindowListener API and all add-on registration calls unchanged.

Only update the WindowListener Experiment implementation to load scripts via:

Services.scriptloader.loadSubScriptWithOptions(url, {
  target,
  charset: "UTF-8",
  allowUnsafeURL: true,
});

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions