Closed Bug 1126820 Opened 9 years ago Closed 9 years ago

persist Request context attribute in ServiceWorker Cache

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39

People

(Reporter: bkelly, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file, 1 obsolete file)

The ServiceWorker Cache should persist the RequestContext value after Request.context is implemented in bug 1119037.
I think Request.context does the wrong thing for now (see bug 1121157 comment 1).  Setting the dependency so that we figure that out first.
Depends on: 1121157
Turns out that I need to fix this for bug 1147699, otherwise the IPDL serialization of RequestContext fails, and the tests crash.
Assignee: nobody → ehsan
Blocks: 1147699
No longer depends on: 1121157
Ben, the test here is based on bug 1147699.  Please see <https://github.com/ehsan/gecko-dev/tree/explicit> if you want to take a look at all of those patches on top of each other.
Attachment #8584274 - Flags: review?(bkelly)
Took out a debug statement which was accidentally left in.
Attachment #8584282 - Flags: review?(bkelly)
Attachment #8584274 - Attachment is obsolete: true
Attachment #8584274 - Flags: review?(bkelly)
Comment on attachment 8584282 [details] [diff] [review]
Persist the Request.context attribute in DOM Cache

Review of attachment 8584282 [details] [diff] [review]:
-----------------------------------------------------------------

Starting to feel like maybe the enum asserts should move to a separate header or something, but we can do that later.

Note, the default context for a synthesized Request may change.  I was talking to Anne and he suggested maybe making it empty string by default and having fetch() set it to "fetch".
Attachment #8584282 - Flags: review?(bkelly) → review+
(In reply to Ben Kelly [:bkelly] from comment #5)
> Starting to feel like maybe the enum asserts should move to a separate
> header or something, but we can do that later.

Let me know if you want me to do that in a separate bug.

> Note, the default context for a synthesized Request may change.  I was
> talking to Anne and he suggested maybe making it empty string by default and
> having fetch() set it to "fetch".

Good to know, but still, as long as we can't synthesize Request objects with context values of our choosing from script, the test strategy will remain the same.
Comment on attachment 8584282 [details] [diff] [review]
Persist the Request.context attribute in DOM Cache

Hold for clarification from Anne.
Attachment #8584282 - Flags: review+
(In reply to Ben Kelly [:bkelly] from comment #7)
> Comment on attachment 8584282 [details] [diff] [review]
> Persist the Request.context attribute in DOM Cache
> 
> Hold for clarification from Anne.

How would that change anything about this patch?
Anne is now telling me Cache should always sanitize the Request and therefore always produce a context of "fetch".
Comment on attachment 8584282 [details] [diff] [review]
Persist the Request.context attribute in DOM Cache

r=me for now.  We can always take it back out if the spec ends up changing.
Attachment #8584282 - Flags: review+
Depends on: 1148818
I somehow managed to accidentally fold this patch into another one, so ended up landing this as part of https://hg.mozilla.org/integration/mozilla-inbound/rev/e7e532d69293.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
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: