Re: [w3c/ServiceWorker] Remove incumbent/fetching record from Cache behavior (#1190)

jakearchibald commented on this pull request.



> -                            1. Else:
-                                1. Delete |fetchingRecord| from <a>request to response map</a>.
-                            1. Reject |responseBodyPromise| with a <code>TypeError</code>.
-                        1. Else:
-                            1. Set the <a>incumbent record</a> of the corresponding <a>fetching record</a> |fetchingRecord| in <a>request to response map</a> to the copy of |fetchingRecord|.
-                            1. Let |invalidRecords| be the result of running <a>Query Cache</a> algorithm passing |fetchingRecord|.\[[key]] as the argument.
-                            1. For each |invalidRecord| in |invalidRecords|:
-                                1. If |invalidRecord| is not |fetchingRecord|, delete it from <a>request to response map</a>.
-                            1. Resolve |responseBodyPromise| with |response|.
-                    1. Add |responseBodyPromise| to |responseBodyPromiseArray|.
-                1. Let |q| be <a>waiting for all</a> of |responseBodyPromiseArray|.
-                1. Return the result of <a>transforming</a> |q|  with a fulfillment handler that returns undefined.
+                        1. [=list/For each=] |fieldValue| of |fieldValues|:
+                            1. If |fieldValue| matches "`*`", then:
+                                1. Set |matchAsterisk| to true.
+                                1. [=Break=].

This one is slightly different since it's in parallel steps.

Right now we're waiting on fetches to complete even though we know the operation is a failure, so it seems better to reject *responsePromise*, abort the ongoing fetches, then abort the steps.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1190#discussion_r144048116

Received on Wednesday, 11 October 2017 15:27:57 UTC