Closed
Bug 1134325
Opened 10 years ago
Closed 10 years ago
Set body of Request object used for onfetch event
Categories
(Core :: DOM: Workers, defect)
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: jdm, Assigned: ehsan.akhgari)
References
Details
Attachments
(2 files)
(deleted),
patch
|
mcmanus
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
jdm
:
review+
|
Details | Diff | Splinter Review |
There's currently a TODO comment in FetchEventRunnable::DispatchFetchEvent. It would be kind of sucky to always duplicate the request body for memory usage reasons...
Reporter | ||
Updated•10 years ago
|
Blocks: ServiceWorkers-v1
Reporter | ||
Comment 1•10 years ago
|
||
Important bits:
HttpBaseChannel::GetUploadStream will get an input stream for the request body. We'll probably need to rewind it after reading it, like http://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/nsHttpChannel.cpp#6173 in DoAuthRetry. The easiest way to accomplish this bug is to just eagerly get the body, extract it to a string and create the Request object with the result. The better way to do it would be to add a lazy getter to the Request object that only extracts the stream as necessary, to avoid the performance and memory hit of duplicating it. I'd probably be fine with that as a followup?
Reporter | ||
Comment 2•10 years ago
|
||
The bit when we create the request object is http://mxr.mozilla.org/mozilla-central/source/dom/workers/ServiceWorkerManager.cpp#2246 in DispatchFetchEvent.
Updated•10 years ago
|
Blocks: nga-toolkit-service-workers
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → ehsan
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8601105 -
Flags: review?(mcmanus)
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8601106 -
Flags: review?(josh)
Reporter | ||
Updated•10 years ago
|
Attachment #8601106 -
Flags: review?(josh) → review+
Updated•10 years ago
|
Attachment #8601105 -
Flags: review?(mcmanus) → review+
Comment 7•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/82f7c0c91407
https://hg.mozilla.org/mozilla-central/rev/70bd577548bf
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in
before you can comment on or make changes to this bug.
Description
•