I am writing an addon these days, and I found some strange and unexpected behavior regarding onUnload() function.
My addon is updating the Home page URL upon install, and reverts that URL when the user removes or disables the addon.
But I noticed that when I remove + use “Undo” multiple times, the function onUnload() is never reached again.
My onUnload() function is added to the exports, and is correctly called most of the time. I think that upon “disable” or “remove” command in about:addons, the onUnload() function should automatically be called? But according to my logging, it seems it is not always the case.