Commit 60a6666
committed
Avoid logspam: "Cannot find menu item with id ..."
The extension frequently tries to remove context menus that do not
exists, which results in errors like:
> Error: Cannot find menu item with id firefox-container-1
because starting from Firefox 136, the contextMenus.remove method
rejects if the menu item does not exist. To avoid logspam, catch it.
References:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1688743
- https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/136#changes_for_add-on_developers1 parent 0372abd commit 60a6666
2 files changed
Lines changed: 19 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
487 | | - | |
488 | | - | |
| 486 | + | |
489 | 487 | | |
490 | 488 | | |
491 | 489 | | |
| |||
672 | 670 | | |
673 | 671 | | |
674 | 672 | | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
680 | 678 | | |
681 | 679 | | |
682 | 680 | | |
| |||
850 | 848 | | |
851 | 849 | | |
852 | 850 | | |
853 | | - | |
| 851 | + | |
854 | 852 | | |
855 | 853 | | |
856 | | - | |
| 854 | + | |
857 | 855 | | |
858 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
859 | 864 | | |
860 | 865 | | |
861 | 866 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
0 commit comments