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

jungkees commented on this pull request.



>      </section>
 
     <section algorithm="cache-addAll">
       <h4 id="cache-addAll">{{Cache/addAll(requests)}}</h4>
 
       <dfn method for="Cache"><code>addAll(|requests|)</code></dfn> method *must* run these steps:
 
-        1. Let |responsePromiseArray| be an empty array.
-        1. Let |requestArray| be an empty array.
+        1. Let |r| be null.

I intentionally factored the definition of |r| out of the nested blocks to reduce redundancy. It seems not a big deal as the local variable will likely to be stored in a register in machine level. But which is a better practice? I thought defining them within for-blocks is analogous to doing the same in implementations.

-- 
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_r143947243

Received on Wednesday, 11 October 2017 08:49:17 UTC