If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

consider using QuotaManager origin/group when determining Manager uniqueness in Service Worker Cache

RESOLVED FIXED in Firefox 43

Status

()

Core
DOM
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: bkelly, Assigned: bkelly)

Tracking

unspecified
mozilla43
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox43 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
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.

Comment 1

3 years ago
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.
(Assignee)

Comment 2

3 years ago
Close per Jan's comment 1.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
(Assignee)

Comment 3

2 years ago
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.
Blocks: 1184607
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
(Assignee)

Updated

2 years ago
Assignee: nobody → bkelly
Status: REOPENED → ASSIGNED
(Assignee)

Comment 4

2 years ago
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.
Attachment #8654201 - Flags: review?(ehsan)
(Assignee)

Comment 5

2 years ago
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.
Attachment #8654201 - Attachment is obsolete: true
Attachment #8654201 - Flags: review?(ehsan)
Attachment #8654209 - Flags: review?(ehsan)
Duplicate of this bug: 1165219
Attachment #8654209 - Flags: review?(ehsan) → review+

Comment 7

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/fe34209431f0
https://hg.mozilla.org/mozilla-central/rev/fe34209431f0
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago2 years ago
status-firefox43: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.