W3C home > Mailing lists > Public > public-html-diffs@w3.org > December 2008

spec/Overview.html 1.1724 2553 Make sure to propagate add() and remove(

From: poot <cvsmail@w3.org>
Date: Wed, 24 Dec 2008 11:14:57 +0900 (JST)
To: public-html-diffs@w3.org
Message-Id: <20081224021457.D9A6F2BBFA@toro.w3.mag.keio.ac.jp>

Make sure to propagate add() and remove() changes when updating the
cache. (whatwg r2553)

cache removal steps
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1724.html#cache-removal-steps
Associate any Document objects that were flagged as candidates for this manifest URL's caches with cache.
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1724.html#flagAsCandidateForCache-result

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1723&r2=1.1724&f=h
http://html5.org/tools/web-apps-tracker?from=2552&to=2553

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1723
retrieving revision 1.1724
diff -u -d -r1.1723 -r1.1724
--- Overview.html	24 Dec 2008 00:27:16 -0000	1.1723
+++ Overview.html	24 Dec 2008 02:11:49 -0000	1.1724
@@ -29699,20 +29699,47 @@
 
    <li>
 
-    <p>Otherwise, this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>:</p>
+    <p>Otherwise, this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>. Perform
+    the following substeps atomically, so as to avoid race
+    conditions:</p>
 
-    <p><a href=#fire-a-simple-event>Fire a simple event</a> called <code title=event-updateready>updateready</code> at the
-    <code><a href=#applicationcache>ApplicationCache</a></code> singleton of each <a href=#browsing-context>browsing
-    context</a> whose <a href=#active-document>active document</a> is associated
-    with a cache in <var title="">cache group</var>. The default
-    action of this event should be the display of some sort of user
-    interface indicating to the user that a new version is available
-    and that they can activate it by reloading the page.</p>
+    <ol><li>
 
-    <p>Set the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of
-    <var title="">cache group</var> to <i>idle</i>.</p>
+      <p>If any <a href=#concept-appcache-dynamic title=concept-appcache-dynamic>dynamic
+      entries</a> in any of the <a href=#application-cache title="application
+      cache">application caches</a> in the <var title="">cache
+      group</var> were added or removed (using the <code title=dom-appcache-add><a href=#dom-appcache-add>add()</a></code> and <code title=dom-appcache-remove><a href=#dom-appcache-remove>remove()</a></code> methods) while the
+      update process was in progress, then replay the sequence of adds
+      and removes on <var title="">cache</var>, using the resources
+      that were fetched by the <code title=dom-appcache-add><a href=#dom-appcache-add>add()</a></code> method if applicable.</p>
 
-   </li>
+     </li>
+
+     <li>
+
+      <p>For each <a href=#browsing-context>browsing context</a> whose <a href=#active-document>active
+      document</a> is associated with a cache in <var title="">cache group</var>, <a href=#queue-a-task>queue a task</a> to
+      <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-updateready>updateready</code> at the relevant
+      <code><a href=#applicationcache>ApplicationCache</a></code> singleton. The default action of
+      these events should be the display of some sort of user
+      interface indicating to the user that a new version is available
+      and that they can activate it by reloading the page.</p>
+
+      <p class=note>Since this step merely queues tasks, and since
+      all these substeps are being done atomically, the next step is
+      guaranteed to happen before the events are actually
+      dispatched.</p>
+
+     </li>
+
+     <li>
+
+      <p>Set the <a href=#concept-appcache-status title=concept-appcache-status>status</a>
+      of <var title="">cache group</var> to <i>idle</i>.</p>
+
+     </li>
+
+    </ol></li>
 
   </ol><p>The <dfn id=cache-removal-steps>cache removal steps</dfn> are as follows:<ol><li><p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache
    attempt</a>, then discard <var title="">cache</var> and abort
Received on Wednesday, 24 December 2008 02:15:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 06:13:57 GMT