Closed Bug 1393661 Opened 7 years ago Closed 7 years ago

Resetting customization reshows add-ons after a restart because the new set of 'seen' widgets isn't saved

Categories

(Firefox :: Toolbars and Customization, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 57

People

(Reporter: tcampbell, Assigned: Gijs)

References

Details

(Whiteboard: [fixed by bug 1393574])

If one resets the toolbar from the customizations view, it does not show add-on buttons (such as screenshots or test pilot). When browser is restarted, the layout adds default add-on buttons. I expect resetting layout should generate a stable layout that is consistent with layout after restarting browser.
Gijs, perhaps you can look at this or redirect it. Thanks
Flags: needinfo?(gijskruitbosch+bugs)
For this one, if Gijs is on PTO next week, maybe mixedpuppy knows what's going on here - I think he's worked in this area before.
Flags: needinfo?(mixedpuppy)
Yeah, I looked at this a bit earlier. Not really done figuring this out - the expected behaviour is that buttons stay out. The bug is that they don't seem to be in gSeenWidgets. I think this because in reset() we set gDirty to true but don't force a save if gSeenWidgets is not empty. So if you follow these steps:

1. open firefox
2. use restore defaults
3. restart

the buttons come back

but if you do:

1. open firefox
2. use restore defaults
3. move the home button in the toolbar
4. restart

they don't.

I suspect just calling saveState() in this case, too, will fix this, but I don't really know why that is necessary / wasn't necessary before. Need to dig into that bit a bit more. Leaving needinfo for now, I *might* have time tomorrow, otherwise maybe Shane can figure it out in my absence, otherwise I'll do it when I get back. I somewhat doubt this bit is related to any photon changes, though it could be, of course...
Summary: Resetting customization doesn't show add-ons until restart → Resetting customization reshows add-ons after a restart because the new set of 'seen' widgets isn't saved
Not a (recent) regression, this just never worked quite right, AFAICT (checked with Firefox 49).
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Flags: needinfo?(mixedpuppy)
Flags: needinfo?(gijskruitbosch+bugs)
Relevant code has been there since bug 1096763, the test of which claims that we expect there to be no saved state after a reset "otherwise undo wouldn't work right". That is not (or at least no longer) true, I think, but the test will need updating regardless (and we should be careful about not breaking undo).
See Also: → 1096763
Depends on: 1393574
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by bug 1393574]
Target Milestone: --- → Firefox 57
You need to log in before you can comment on or make changes to this bug.