Closed
Bug 695233
Opened 14 years ago
Closed 13 years ago
Flag the use of Components in Jetpack addons since it's being deprecated.
Categories
(addons.mozilla.org Graveyard :: Add-on Validation, defect, P2)
addons.mozilla.org Graveyard
Add-on Validation
Tracking
(Not tracked)
RESOLVED
FIXED
2012-09-27
People
(Reporter: robhudson, Assigned: basta)
References
Details
Re: https://bugzilla.mozilla.org/show_bug.cgi?id=663541
It was originally agreed upon that checking for this in amo-validator would be good, but after reading the referenced bug closely I'm not sure.
We'd have to be able to detect the difference between use of Components if they haven't used require("chrome") vs if they have. For example:
// OK, and recommended to make transition easier
var {Components} = require("chrome");
Components.classes...; // <- don't warn
// Not OK, Components will go away soon
Components.classes...; // <- do warn
| Assignee | ||
Comment 1•14 years ago
|
||
My suggestion is to mark Components as a dangerous global in all Jetpack add-ons. Since it's deprecated, it should be a warning, like the "dangerous" flag produces.
Comment 2•14 years ago
|
||
We're also warning whenever require("chrome") is present. Is the problem that 2 warnings will show up? I'm not too concerned about that.
| Reporter | ||
Comment 3•14 years ago
|
||
The problem I was seeing was that it would be difficult to do it "right". But we can flag the use of Components to throw a warning and the developer can at least be notified of its deprecation and know for themselves if they've used `var {Components} = require("chrome");` they can safely ignore the warnings.
| Assignee | ||
Comment 4•13 years ago
|
||
This requires that we differentiate between used and overridden globals, which is what's going to happen with bug 724997.
Depends on: 724997
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → mattbasta
| Assignee | ||
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•13 years ago
|
Target Milestone: --- → 2012-09-27
Updated•10 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•