Closed Bug 940254 Opened 8 years ago Closed 7 years ago
Make "storage" permission in the database not grant "offline-app"
Currently we grant "offline-app" permission in nsIPermissionManager for all apps that enumerate "storage" as a permission in the manifest. This has the downside that we start looking for appcached resources in the appcache database, which slows down pageload. A simple fix to this would be to simply not grant "offline-app" permission when a manifest enumerates "storage". Instead we could create a separate manifest permission specifically for appcache. That way any apps that doesn't use appcache, including all our gaia apps, can simply avoid asking for the appcache permission.
Mike, can you make sure that this performance bug gets some attention. It should be as simple as modifying the permission in  to not grant "offline-app" for the "storage" permission, and instead create a separate permission. However we also need to coordinate with the marketplace team to make sure that any app which uses appcache also uses the new permission. Oh, and we need to remove the "offline-app" permission from any already-installed apps as appropriate. That's probably trickier.  http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/PermissionsTable.jsm
We really need to check what marketplace apps are currently using the storage permission to identify any compatibility fallout before moving forward here.
From the dump in bug 940682 we can see that 268 application declare the "storage" permission. Among these, only 27 also have an appcache_path declared in their manifest. Jonas, what about doing what you say in comment #0 and automatically grand the offline-cache (and pin-app) permission to apps that declare an appcache in their manifest?
That sounds like a great idea!
Attachment #8356881 - Flags: review?(anygregor) → review+
Backed out in https://hg.mozilla.org/integration/b2g-inbound/rev/f9b88a4cec04 for breaking xpcshell tests: https://tbpl.mozilla.org/php/getParsedLog.php?id=32732490&tree=B2g-Inbound
Pushed to try with a couple of tests fixed: https://tbpl.mozilla.org/?tree=Try&rev=f72b8ec86141
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Whiteboard: [c=progress p= s= u=] → [c=progress p= s=2014.01.17 u=]
You need to log in before you can comment on or make changes to this bug.