User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 Build ID: 20170212110301 Steps to reproduce: If you remove context menus using browser.contextMenus.removeAll(), it does not remove the listeners attached to those context menu items. So if you create context menu items with the same id as the ones who were deleted, the listeners are still attached. This is a feature request to remove all the listeners that are attached to the context menu items that are being deleted.
I believe this bug is invalid, as the code found here - http://searchfox.org/mozilla-central/source/browser/components/extensions/ext-c-menus.js#156 - should prevent this from ever happening. Geoffrey, if you believe this is still an issue, could you please provide a sample webextension which reproduces the issue? I was unable to reproduce it locally.
Created attachment 8896787 [details] TestContextMenuListeners.zip Test addon showing the problem. It shouldn't log anything when you click the context menu items, but they still have a listener attached so they log their ID.