Closed Bug 1214912 Opened 9 years ago Closed 9 years ago

Show compatibility error if an add-on uses nsIPermissionManager

Categories

(addons.mozilla.org Graveyard :: Compatibility Tools, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jorgev, Assigned: cgrebs)

Details

(Whiteboard: [port-to-js-validator][fx42])

As explained in bug 1165263 (and dependencies), the Permission Manager now uses origins instead of hosts to store its permissions. This means some methods work differently, sometimes in subtle ways, so it's best to flag all instances of nsIPermissionManager and Services.perms

This is a compatibility error, so the add-on shouldn't be upgraded in this case. It should also appear as a warning in regular validations.

Message:

The Permission Manager now uses origins instead of hosts, meaning that http://mozilla.com and https://mozilla.com now have different permissions. Some methods in the component now take nsIURI instead of strings. See <LINK> for more information.

Link: https://bugzilla.mozilla.org/show_bug.cgi?id=1165263

Affected add-on:

https://addons.mozilla.org/addon/yahoo-mail-notifier/

Release timing:

Firefox 42 will be released on November 3rd.
Assignee: mstriemer → nobody
Iteration: --- → 44.3 - Nov 2
Whiteboard: [fx42] → [port-to-js-validator]
Assignee: nobody → cgrebs
We've tried this modified validator on the yahoo-mail-notifier add-on, and it doesn't flag it.

However, it did flag it if the nsIPermissionManager code is copied to other places in the add-on (eg. to the global context of the same file). The exact thing we did is take the code from chrome/ym_notifier/content/ym_notifier.js (line 2053 and below), and copied it at the beginning, and then at the end of the same file. In each case, it flagged the add-on correctly (as is the case in the unit tests where we use the same code).

So we have no clue why this is happening, could someone please give it a look? :andym would you know who we could ask for help?
Flags: needinfo?(amckay)
mstriemer on the case
Flags: needinfo?(amckay)
Issue was fixed by :mstriemer in ttps://github.com/mozilla/amo-validator/pull/335!
Commit pushed to master at https://github.com/mozilla/amo-validator

https://github.com/mozilla/amo-validator/commit/c39bc4721e9c3d7a7baa0a3f16e688a840abbef7
Show compatibility error if an add-on uses nsIPermissionManager (pair with cgrebs) (bug 1214912)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [port-to-js-validator] → [port-to-js-validator][fx42]
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.