Closed
Bug 1119026
Opened 9 years ago
Closed 9 years ago
Fetch API: Set skip serviceworker flag for fetch() invoked in ServiceWorkers
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: nsm, Assigned: nsm)
References
Details
Attachments
(1 file)
3.18 KB,
patch
|
bkelly
:
review+
baku
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8545526 -
Flags: review?(bkelly)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → nsm.nikhil
Status: NEW → ASSIGNED
Comment 2•9 years ago
|
||
Comment on attachment 8545526 [details] [diff] [review] Respect skip serviceworker flag Review of attachment 8545526 [details] [diff] [review]: ----------------------------------------------------------------- One question, but otherwise looks good to me. Flag Andrea for DOM peer sign off. ::: dom/fetch/FetchDriver.cpp @@ +373,5 @@ > + // While the spec also gates on the client being a ServiceWorker, we can't > + // infer that here. Instead we rely on callers to set the flag correctly. > + if (mRequest->SkipServiceWorker()) { > + nsCOMPtr<nsIHttpChannelInternal> internalChan = do_QueryInterface(httpChan); > + internalChan->ForceNoIntercept(); Do you need to do this for redirect channels as well? ::: dom/fetch/InternalRequest.h @@ +135,5 @@ > mReferrer.Assign(aReferrer); > } > > bool > + SkipServiceWorker() const
Attachment #8545526 -
Flags: review?(bkelly)
Attachment #8545526 -
Flags: review?(amarchesini)
Attachment #8545526 -
Flags: review+
Comment 3•9 years ago
|
||
Also, it seems we need to set the skip service worker if a ServiceWorker is consulted and declines to override the network response. Is that something Josh's code will need to do?
Updated•9 years ago
|
Attachment #8545526 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Ben Kelly [:bkelly] from comment #2) > Comment on attachment 8545526 [details] [diff] [review] > Respect skip serviceworker flag > > Review of attachment 8545526 [details] [diff] [review]: > ----------------------------------------------------------------- > > One question, but otherwise looks good to me. Flag Andrea for DOM peer sign > off. > > ::: dom/fetch/FetchDriver.cpp > @@ +373,5 @@ > > + // While the spec also gates on the client being a ServiceWorker, we can't > > + // infer that here. Instead we rely on callers to set the flag correctly. > > + if (mRequest->SkipServiceWorker()) { > > + nsCOMPtr<nsIHttpChannelInternal> internalChan = do_QueryInterface(httpChan); > > + internalChan->ForceNoIntercept(); > > Do you need to do this for redirect channels as well? I've filed a followup to test it once we can actually test this.
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Ben Kelly [:bkelly] from comment #3) > Also, it seems we need to set the skip service worker if a ServiceWorker is > consulted and declines to override the network response. Is that something > Josh's code will need to do? The interception code will have to make sure it sets SkipServiceWorker() on the request then.
Assignee | ||
Comment 6•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7ad380221ba6
https://hg.mozilla.org/mozilla-central/rev/7ad380221ba6
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•