Closed Bug 1621841 Opened 4 years ago Closed 4 years ago

Update extensions prompts code to match Firefox

Categories

(Thunderbird :: Add-Ons: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 76.0

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(5 files)

Our extension prompt code is a horrible mash-up of various bits of Firefox code, and it needs updating. I'm going to try to copy over a bunch of Firefox tests, too.

This brings our code up-to-date with mozilla-central's ExtensionsUI.jsm and browser-addons.js. I've pulled apart the implementations of gXPInstallObserver and ExtensionsUI which were combined previously due to a lot of overlap. This turned out to be a mistake from a maintainability point of view.

Since in this patch I'm mostly trying to achieve parity with the Firefox code, I'll post the differences between ours and theirs which will be easier to read than this.

Attachment #9133782 - Flags: review?(mkmelin+mozilla)

This is the difference between Firefox's gXPInstallObserver and ours.

This is the difference between Firefox's ExtensionsUI object and ours.

Comment on attachment 9133782 [details] [diff] [review]
1621841-pt1-update-code-1.diff

Review of attachment 9133782 [details] [diff] [review]:
-----------------------------------------------------------------

Seems fine to me, r=mkmelin
Attachment #9133782 - Flags: review?(mkmelin+mozilla) → review+

Part two: this keeps all of our appmenu buttons on the same page with regards to alert badges.

Attachment #9133791 - Flags: review?(mkmelin+mozilla)

Part three: tests for all of the above. This is all copied from mozilla-central (browser/base/content/test/webextensions) with some changes to make it work in Thunderbird. Two tests were dropped because they test things that Thunderbird doesn't do.

Attachment #9133792 - Flags: review?(mkmelin+mozilla)
Attachment #9133791 - Flags: review?(mkmelin+mozilla) → review-
Attachment #9133792 - Flags: review?(mkmelin+mozilla) → review+
Attachment #9133791 - Flags: review- → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/808f7c2c6680
Update extensions prompts code to match Firefox. r=mkmelin
https://hg.mozilla.org/comm-central/rev/e3d50753c9d8
Make all appmenu toolbar buttons display alerts. r=mkmelin
https://hg.mozilla.org/comm-central/rev/a12bb1124869
Copy Firefox's extension prompt tests and adapt them to Thunderbird. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 76.0
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/c038cdf6e638
follow-up - Replace a popup notification I mistakenly removed. rs=bustage-fix DONTBUILD
Depends on: 1623575
Regressions: 1654210
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: