Closed
Bug 1339131
Opened 8 years ago
Closed 8 years ago
Don't error out on unknown properties in the theme object
Categories
(WebExtensions :: General, defect)
WebExtensions
General
Tracking
(firefox55 fixed)
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: krupa--use, Assigned: mattw)
References
Details
(Whiteboard: [themes, triaged])
Attachments
(1 file)
Looks like "background_tab" and "background_tab_inactive" properties are not in the schema ( https://dxr.mozilla.org/mozilla-central/source/browser/components/extensions/schemas/theme.json) because of which Firefox throws an error if they are listed in the manifest.json
We should not error out on unknown properties in the theme object.
Updated•8 years ago
|
Comment 1•8 years ago
|
||
I think bug 1244474 should already cover things here! This also fits in nicely with us not needing to implement stubs for unsupported Google Chrome theme properties. Nice!
Updated•8 years ago
|
Whiteboard: [themes, triaged]
Comment 2•8 years ago
|
||
This is still broken. I added a "background_tab_jared" colors property and got the following error in about:debugging,
Log.jsm:748
1488905516732 addons.webextension.<unknown> ERROR Loading extension 'null': Reading manifest: Error processing theme.colors: Unexpected property "background_tab_jared"
controls.js:63:11
Error: Extension is invalid
Stack trace:
loadManifestFromWebManifest<@resource://gre/modules/addons/XPIProvider.jsm:975:11
TaskImpl_run@resource://gre/modules/Task.jsm:319:42
process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:922:23
walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:806:7
scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:742:11
This is the error I get when loading it in about:addons:
Log.jsm:748
1488905679777 addons.webextension.<unknown> ERROR Loading extension 'null': Reading manifest: Error processing theme.colors: Unexpected property "background_tab_jared"
Assignee | ||
Comment 3•8 years ago
|
||
I believe we just need to add an `additionalProperties` section which references `UnrecognizedProperty` to each of the theme sections to fix this: http://searchfox.org/mozilla-central/source/browser/components/extensions/schemas/browser_action.json#14. I think a manifest test would be good to add also to make sure this works.
Comment hidden (mozreview-request) |
Comment 5•8 years ago
|
||
mozreview-review |
Comment on attachment 8844571 [details]
Bug 1339131 - Provide warnings instead of throwing errors for unrecognized properties
https://reviewboard.mozilla.org/r/117954/#review119700
Awesome, thanks!
Attachment #8844571 -
Flags: review?(jaws) → review+
Comment 6•8 years ago
|
||
mozreview-review |
Comment on attachment 8844571 [details]
Bug 1339131 - Provide warnings instead of throwing errors for unrecognized properties
https://reviewboard.mozilla.org/r/117954/#review120034
BOOM! Nice one.
Attachment #8844571 -
Flags: review?(mdeboer) → review+
Pushed by jwein@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eb9bf4230afe
Provide warnings instead of throwing errors for unrecognized properties r=jaws,mikedeboer
Comment 8•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•