Closed
Bug 713062
Opened 13 years ago
Closed 8 years ago
Incorrectly using testExactPermssion to check some permission types
Categories
(Firefox for Android Graveyard :: General, defect, P4)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: Margaret, Unassigned, Mentored)
Details
(Whiteboard: [lang=js])
Fennec is using testExactPermission for all permission types, but other consumers in gecko are using testPermission for most permission types. For some types (like "popup" and "geolocation") it only matters if we are consistent within /mobile, since that's the only place the permission is set/read, but other permissions (like "offline-app") are read in other places (like /dom). On desktop, the only permission that uses testExactPermission is geolocation, and I feel like we should just be consistent with desktop, unless there's some compelling reason not to be. At the very least we should make sure we're doing the right thing for permissions that other modules are using.
Updated•13 years ago
|
Priority: -- → P4
Reporter | ||
Comment 1•11 years ago
|
||
This bug is really old, and I don't think we actually care about fixing it. We can reopen if someone ever complains about us being too strict on checking permissions against subdomains.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Comment 2•11 years ago
|
||
I think consistency across Gecko/Fennec (and to a lesser degree, Fennec/Firefox) is important. Seems like a good first bug, potentially?
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Reporter | ||
Comment 3•11 years ago
|
||
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #2) > I think consistency across Gecko/Fennec (and to a lesser degree, > Fennec/Firefox) is important. Seems like a good first bug, potentially? I'm worried this might be tricky for a first bug, since it will involve auditing all the places we use testExactPermission/testPermission in our code, but you're right that I can make it into a mentor bug. Doing some cursory MXRing, it does look like we should just change everything to use testPermssion, with the exception of geolocation, but I would like whoever takes this bug to do a more thorough investigation.
Assignee: margaret.leibovic → nobody
Whiteboard: [mentor=margaret][lang=js]
MXR looks up just three occurences of testExactPermission and one of testPermission. Grep through whole source tree gets slightly more - I need to understand why. Anyway, the number of entries looks small. Since this activity assumes less or more wide code base investigation and does not seem as to be urgent, I'd like to own it, if you have no objections. For now I yank it.
Reporter | ||
Comment 5•11 years ago
|
||
Andrey, thanks for offering to take this bug. Let me know if you have any questions about how to proceed!
Assignee: nobody → donboniface83
MXR shows there are 3 occurences of testExactPermission under mobile/ branch: 1. mobile/android/chrome/content/browser.js line 5820 -- let result = Services.perms.testExactPermission(BrowserApp.selectedBrowser.currentURI, "popup"); 2. mobile/android/chrome/content/OfflineApps.js line 15 -- if (Services.perms.testExactPermission(currentURI, "offline-app") != Services.perms.UNKNOWN_ACTION) 3. mobile/android/chrome/content/PermissionsHelper.js line 140 -- return Services.perms.testExactPermission(aURI, aType); I did not care about the real meaning yet, just checked for the consistence. And here is what I can see: 1. mobile/android/chrome/content/browser.js This is in PopupBlockerObserver.onUpdatePageReport(event), which also is defined in browser/metro/base/content/browser.js and does the same test. 2. mobile/android/chrome/content/OfflineApps.js OfflineApps.offlineAppRequested(contentWindow) The same is in browser/base/content/browser.js browser/metro/base/content/helperui/OfflineApps.js 3. mobile/android/chrome/content/PermissionsHelper.js It's a "helper" function getPermission, that's supposed to be widely used for other types, but it clearly states: if (aType == "geolocation") return Services.perms.testExactPermission(aURI, aType); return Services.perms.testPermission(aURI, aType); so not a concern though.
Assignee | ||
Updated•10 years ago
|
Mentor: margaret.leibovic
Whiteboard: [mentor=margaret][lang=js] → [lang=js]
Comment 7•10 years ago
|
||
Last activity was almost one year ago. Resetting assignee.
Assignee: donboniface83 → nobody
Status: REOPENED → NEW
Reporter | ||
Comment 8•8 years ago
|
||
Let's just close this, I don't think it's worth fixing this.
Status: NEW → RESOLVED
Closed: 11 years ago → 8 years ago
Resolution: --- → WONTFIX
Assignee | ||
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•