Closed Bug 1715434 Opened 3 years ago Closed 3 years ago

Registering content scripts is broken

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

Thunderbird 90
defect

Tracking

(thunderbird_esr78 unaffected, thunderbird91+ fixed)

RESOLVED FIXED
92 Branch
Tracking Status
thunderbird_esr78 --- unaffected
thunderbird91 + fixed

People

(Reporter: darktrojan, Assigned: darktrojan)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Sometime in the 90 cycle, registering ordinary content scripts broke. Neither registration by the manifest or by browser.contentScripts.register work, AFAICT.

Version: unspecified → Thunderbird 90

Gah! I found some of the problem. The toolkit code now checks the message manager group of the browser in question, but we use weird groups for the link handling behaviour.

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Regressed by: 1708238

Thunderbird uses these extra groups for special handling of links, and they need to be considered the same as the browsers group for WebExtensions purposes.

This patch doesn't completely solve the problem. I'm still not seeing the right behaviour when it comes to enumerating existing browsers, like injecting scripts into already-open tabs, or removing scripts if the extension shuts down. Any ideas would be appreciated, :zombie.

Pushed by geoff@darktrojan.net: https://hg.mozilla.org/integration/autoland/rev/7d4ab051ebf7 In Thunderbird, consider some extra message manager groups when injecting WebExt content scripts. r=zombie

Comment on attachment 9231130 [details]
Bug 1715434 - In Thunderbird, consider some extra message manager groups when injecting WebExt content scripts. r=zombie

Beta/Release Uplift Approval Request

  • User impact if declined: Thunderbird extensions won't be able to use the contentScripts API for all of ESR 91. This does not affect Firefox.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky):
  • String changes made/needed:
Attachment #9231130 - Flags: approval-mozilla-beta?

Comment on attachment 9231130 [details]
Bug 1715434 - In Thunderbird, consider some extra message manager groups when injecting WebExt content scripts. r=zombie

Low risk in early betas, approved for uplift in 91 beta 4, thanks

Attachment #9231130 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Target Milestone: --- → 92 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/412c4661446b
Regression test for content scripts. r=john.bieling
https://hg.mozilla.org/comm-central/rev/fb9fe9eb149b
Update compose/message display script loading behaviour to match content scripts. r=john.bieling

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Comment on attachment 9231303 [details]
Bug 1715434 - Regression test for content scripts. r=john.bieling

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
content scripts cannot be registered

Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky):
The test has a small chance of failing, Geoff will look at it later.

Attachment #9231303 - Flags: approval-comm-beta?

Comment on attachment 9231304 [details]
Bug 1715434 - Update compose/message display script loading behaviour to match content scripts. r=john.bieling

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
content scripts cannot be registered

Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky):
Low.

Attachment #9231304 - Flags: approval-comm-beta?

Comment on attachment 9231304 [details]
Bug 1715434 - Update compose/message display script loading behaviour to match content scripts. r=john.bieling

[Triage Comment]
Approved for beta

Attachment #9231304 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9231303 [details]
Bug 1715434 - Regression test for content scripts. r=john.bieling

[Triage Comment]
Approved for beta

Attachment #9231303 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9231130 [details]
Bug 1715434 - In Thunderbird, consider some extra message manager groups when injecting WebExt content scripts. r=zombie

Clearing the approval flag to get this off the needs-uplift radar.

Attachment #9231130 - Flags: approval-mozilla-beta+
Regressions: 1722065
No longer regressions: 1722065
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: