Closed Bug 940254 Opened 10 years ago Closed 10 years ago

Make "storage" permission in the database not grant "offline-app"


(Core Graveyard :: DOM: Apps, defect)

Gonk (Firefox OS)
Not set


(Not tracked)



(Reporter: sicking, Assigned: fabrice)



(Keywords: perf, Whiteboard: [c=progress p= s=2014.01.17 u=])


(1 file)

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 [1] 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.

We really need to check what marketplace apps are currently using the storage permission to identify any compatibility fallout before moving forward here.
Depends on: 940682
Keywords: perf
Whiteboard: [c=progress p= s= u=]
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!
Assignee: nobody → fabrice
Attachment #8356881 - Flags: review?(anygregor)
Attachment #8356881 - Flags: review?(anygregor) → review+
Pushed to try with a couple of tests fixed:
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Whiteboard: [c=progress p= s= u=] → [c=progress p= s=2014.01.17 u=]
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.