Closed Bug 1444456 Opened 6 years ago Closed 6 years ago

contentScripts.register JSON API schema should not use "additionalProperties"

Categories

(WebExtensions :: General, defect)

60 Branch
defect
Not set
trivial

Tracking

(firefox60 fixed)

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: rpl, Assigned: rpl)

Details

Attachments

(1 file)

The JSON API Schema definition of the contentScripts.register API method currently contains an "additionalProperties" set to "UnrecognizedProperty", but "additionalProperties" should not be used for this API method, it was part of the content script options for the manifest (where it makes sense to allow unknown properties to just raise a warning instead of an error during the addon installation) and it has been part of the contentScripts.register definition by mistake.

The "additionalProperties" is not actually allowing any additional property to the contentScripts.register API method (because the "UnrecognizedProperty" ref can't be resolved, because it is actually definied inside the manifest namespace) but it is producing the wrong error message ("Internal error: Type UnrecognizedProperty not found" instead of the expected "Type error for parameter contentScriptOptions (Unexpected property \\"unknownParam\\") for contentScripts.register" error message).
Summary: Fix contentScripts.register JSON API schema should not use "additionalProperties" → contentScripts.register JSON API schema should not use "additionalProperties"
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Attachment #8957611 - Flags: review?(mixedpuppy)
Comment on attachment 8957611 [details]
Bug 1444456 - Fix contentScripts.register API schema should not use additionalProperties.

https://reviewboard.mozilla.org/r/226502/#review232398
Attachment #8957611 - Flags: review?(mixedpuppy) → review+
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/d9604e2f313f
Fix contentScripts.register API schema should not use additionalProperties. r=mixedpuppy
https://hg.mozilla.org/mozilla-central/rev/d9604e2f313f
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Flags: qe-verify-
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: