Currently the Service Worker Cache determines Manager object uniqueness based on these values: - origin - appId - browser element flag The QuotaManager, however, has some logic to possibly combine different origins into the same directory. For example, I think some about: pages end up with the same quota directory. If this directory combining happens, then we will have two different Manager's accessing the same files on disk. This breaks a number of invariants in the design. We should verify if this is a problem and include the result of QuotaManager::GetInfoFromPrincipal() in the Manager uniqueness test.
That about: stuff is primarily for the loop component (firefox hello). I was not very happy when it was added. I want to remove it, maybe as part of qm v2. We found out that loop guys actually don't use this combining of different origins into the same directory. I believe you don't have to worry about this at all.
Close per Jan's comment 1.
Turns out we do need this since QuotaManager modifies the origin in other ways. For example, it uses "chrome" instead "[system principal]". This is blocking my xpcshell scripts in bug 1184607.
Created attachment 8654201 [details] [diff] [review] Change Cache ManagerId to use QuotaManager's concept of origin. r=ehsan This is necessary for Cache to behave properly for the system principal. In particular, I need this for the xpcshell tests I'm writing over in bug 1184607.
Created attachment 8654209 [details] [diff] [review] Change Cache ManagerId to use QuotaManager's concept of origin. r=ehsan Accidentally included some other changes in the first patch.