Closed Bug 1112071 Opened 10 years ago Closed 9 years ago

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

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: bkelly, Assigned: bkelly)

References

Details

Attachments

(1 file, 1 obsolete file)

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.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
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: nobody → bkelly
Status: REOPENED → ASSIGNED
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)
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)
Attachment #8654209 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/fe34209431f0
Status: ASSIGNED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: