Files
tubestation/browser/components/extensions
Rob Wu 38b9ddf35c Bug 1963616 - Don't try adding action context menus without permission r=willdurand
When an extension does not have the contextMenus or menus permission,
it is not possible to have extension-defined context menus on an
extension's action button. The actionContextMenu() call would never
add menu items in this case.

As the bug report shows, trying to call actionContextMenu() can throw
an error when the ext-menus.js module has not been loaded. To avoid
this error, verify that the extension has the permission to add menus.

Because ext-menus.js is declared with `"events": ["startup"]`, the
module is guaranteed to be loaded if an extension has the permissions.

Differential Revision: https://phabricator.services.mozilla.com/D248154
2025-05-07 23:27:01 +00:00
..