Closed Bug 2070281 Opened 20 days ago Closed 19 days ago

"Discover extensions" button shown multiple times

Categories

(Toolkit :: Add-ons Manager, defect)

defect

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

Details

(Whiteboard: [addons-jira])

Attachments

(2 files)

I saw this report: https://www.reddit.com/r/softwaregore/comments/1wa77qc/calm_down_firefox_ill_discover_some_new_extentions/

That's puzzling because there is logic that is supposed to clean up the button when the panel is removed: onPanelViewHiding in browser-addons.js

The button is created and added here in onPanelViewShowing in browser-addons.js.

... upon looking at that, I see how it could happen: the button is not immediately inserted, but asynchronously from onPanelViewShowing, after a call to getDisabledExtensionsInfo() resolves. The getDisabledExtensionsInfo method could potentially take a non-trivial amount of time when there are no extensions. If a user spam clicks the Extensions button a couple of times before the full extension database is initialized, they could end up in the situation as reported on Reddit.

To fix this we should return early from .getDisabledExtensionsInfo().then( if the panel has closed in the meantime.

Assignee: nobody → rob
Whiteboard: [addons-jira]
Status: NEW → RESOLVED
Closed: 19 days ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
QA Whiteboard: [qa-triage-done-c158/b157]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: