Closed Bug 1134324 Opened 10 years ago Closed 10 years ago

Set credentials and CORS flags on Request object used in onfetch event

Categories

(Core :: DOM: Workers, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: jdm, Assigned: nsm)

References

Details

Attachments

(2 files, 1 obsolete file)

There are currently TODO comments about this in FetchEventRunnable::DispatchFetchEvent.
Impossible to test this without header synthesis.
Depends on: 1134462
Attached file MozReview Request: bz://1134324/nsm (obsolete) —
/r/5409 - Bug 1134324 - Set CORS mode and credentials on Fetch event Request. /r/5411 - Bug 1134324 - TODO add more tests. Pull down these commits: hg pull review -r 369b6e7f65384ba24731c82da55e93d9c1ee069d
Attachment #8577508 - Flags: review?(josh)
Comment on attachment 8577508 [details] MozReview Request: bz://1134324/nsm https://reviewboard.mozilla.org/r/5407/#review4373 ::: dom/workers/ServiceWorkerEvents.cpp (Diff revision 1) > - nsRefPtr<InternalHeaders> headers = response->GetInternalHeaders(); > + nsRefPtr<InternalResponse> ir = response->GetInternalResponse(); This looks unused. ::: dom/workers/ServiceWorkerManager.cpp (Diff revision 1) > + // We have static asserts at the top of this file ensuring the Necko > + // constants match RequestMode, so this direct assignment is fine. > + mRequestMode = static_cast<RequestMode>(mode); I might prefer a switch here instead of the direct assignment, since we can include a default branch as well. ::: dom/workers/ServiceWorkerManager.cpp (Diff revision 1) > + //reqInit.mMode.Construct(mRequestMode); Eh?
Attachment #8577508 - Flags: review?(josh)
One of the necko peers should sign off on the nsIHTTPChannelInternal changes, too.
Comment on attachment 8577508 [details] MozReview Request: bz://1134324/nsm /r/5409 - Bug 1134324 - Set CORS mode and credentials on Fetch event Request. Pull down this commit: hg pull review -r d381c0b9937528bdda35cf3f4e7aa92d793c1b9c
Attachment #8577508 - Flags: review?(honzab.moz)
Comment on attachment 8577508 [details] MozReview Request: bz://1134324/nsm /r/5409 - Bug 1134324 - Set CORS mode and credentials on Fetch event Request. Pull down this commit: hg pull review -r 0b50244fc1f4170ef00a9a69780b4e113595bfd1
Comment on attachment 8577508 [details] MozReview Request: bz://1134324/nsm sorry, forgot to flip reviewboard flags.
Attachment #8577508 - Flags: review?(bkelly)
Comment on attachment 8577508 [details] MozReview Request: bz://1134324/nsm /r/5409 - Bug 1134324 - Set CORS mode and credentials on Fetch event Request. Pull down this commit: hg pull review -r 0b50244fc1f4170ef00a9a69780b4e113595bfd1
Attachment #8577508 - Flags: review?(honzab.moz) → review?(michal.novotny)
Michal, could you review the changes to nsIHttpChannelInternal? Thanks!
Attachment #8577508 - Flags: review?(michal.novotny) → review+
I made a small change in the patch. Earlier, if the cast to http channel failed, we would abort, which led to some XHR tests failing that did not use HTTP urls. I made it case directly to http internal channel, and used an if (internalChannel) {} instead of early return.
Assignee: nobody → nsm.nikhil
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Attachment #8577508 - Attachment is obsolete: true
Attachment #8619513 - Flags: review+
Attachment #8619514 - Flags: review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: