Closed Bug 1717006 Opened 3 years ago Closed 3 years ago

browser.contextMenus.ContextType is not defined anymore in recent Nightly 91

Categories

(WebExtensions :: General, defect, P1)

Firefox 91
defect

Tracking

(firefox-esr78 unaffected, firefox89 unaffected, firefox90 unaffected, firefox91 fixed)

RESOLVED FIXED
91 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox89 --- unaffected
firefox90 --- unaffected
firefox91 --- fixed

People

(Reporter: rpl, Assigned: mixedpuppy)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [mv3-m1])

Attachments

(1 file)

STR:

  • install SnoozeTabs extension from AMO
  • Open the Browser Console and enable "Content Messages" logging from the gear menu (or open an Addon Debugging toolbox for the SnoozeTabs extension from about:debugging)
  • open about:addons in a tab and disable and re-enable the SnoozeTabs extension

Actual behavior:

  • Uncaught TypeError: can't access property "TAB", browser.contextMenus.ContextType is undefined error logged on the console (raised from this line in the SnoozeTabs background script)
  • the extension does not complete its initialization because it does never reach the init() call that follows that line

Expected behavior:

  • no Uncaught TypeError: can't access property "TAB", browser.contextMenus.ContextType is undefined error logged on the console
  • extension does complete its initialization and works as expected

This looks like a recent regression introduced just 1 day ago from Bug 1706398 (in particular from this part of the third patch part of that patchstack).

Has Regression Range: --- → yes
Has STR: --- → yes
Regressed by: 1706398

This issue happens because types are imported at https://searchfox.org/mozilla-central/rev/b172dd415c475e8b2899560e6005b3a953bead2a/toolkit/components/extensions/Schemas.jsm#3004-3008

... but that patch has switched from a plain type definition to an enum, at https://searchfox.org/mozilla-central/diff/f2dce17402b7a571f7c59c02f56d0c16252236aa/browser/components/extensions/schemas/menus.json#47

We should introduce schema support to resolve this bug, as a follow-up to bug 1693403

See Also: → 1693403
Assignee: nobody → mixedpuppy
Severity: -- → S2
Priority: -- → P1
Whiteboard: [mv3-m1]
See Also: → 1718323
Attachment #9229024 - Attachment description: Bug 1717006 revert schema cleanup to fix access to menus.ContextType → Bug 1717006 support choice+string enumeration injection to fix access to menus.ContextType
Blocks: 1718338
Pushed by scaraveo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/813c6084a272 support choice+string enumeration injection to fix access to menus.ContextType r=rpl
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: