[html5] r4172 - [e] (0) Get rid of a potential race condition in the cache update process. Fixin [...]

whatwg at whatwg.org whatwg at whatwg.org
Sun Oct 18 16:52:25 PDT 2009


Author: ianh
Date: 2009-10-18 16:52:22 -0700 (Sun, 18 Oct 2009)
New Revision: 4172

Modified:
   complete.html
   index
   source
Log:
[e] (0) Get rid of a potential race condition in the cache update process.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=7784

Modified: complete.html
===================================================================
--- complete.html	2009-10-18 23:11:25 UTC (rev 4171)
+++ complete.html	2009-10-18 23:52:22 UTC (rev 4172)
@@ -53500,26 +53500,31 @@
      than the processing of <code>Document</code> objects already
      associated with an <a href=#application-cache>application cache</a> in the <var title="">cache group</var>.</li>
 
+     <li><p>Let <var title="">task list</var> be an empty list of
+     <a href=#concept-task title=concept-task>tasks</a>.</p>
+
      <li><p>For each <a href=#cache-host>cache host</a> associated with an
      <a href=#application-cache>application cache</a> 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> named <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code> that is
+     group</var>, create a <a href=#concept-task title=concept-task>task</a> to
+     <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code> that is
      cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
-     <a href=#cache-host>cache host</a>. The default action of these events must
-     be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the
-     display of some sort of user interface indicating to the user
-     that the application is no longer available for offline
-     use.</li>
+     <a href=#cache-host>cache host</a>, and add it to <var title="">task
+     list</var>. The default action of these events must be, if the
+     user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
+     some sort of user interface indicating to the user that the
+     application is no longer available for offline use.</li>
 
      <li><p>For each entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
-     entries</a>, <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
-     event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> (not <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code>!) at the
+     entries</a>, create a <a href=#concept-task title=concept-task>task</a>
+     to <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named
+     <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> (not <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code>!) at the
      <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
      host</a> the <code>Document</code> for this entry, if there
-     still is one. The default action of this event must be, if the
-     user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
-     some sort of user interface indicating to the user that the user
-     agent failed to save the application for offline use.</li>
+     still is one, and add it to <var title="">task list</var>. The
+     default action of this event must be, if the user agent
+     <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
+     user interface indicating to the user that the user agent failed
+     to save the application for offline use.</li>
 
      <li><p>If <var title="">cache group</var> has an
      <a href=#application-cache>application cache</a> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> is
@@ -53531,6 +53536,9 @@
 
      <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> be <i>idle</i>.</li>
 
+     <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-task title="queue a task">queue</a>
+     that task.</li>
+
      <li><p>Abort the <a href=#application-cache-download-process>application cache download
      process</a>.</li>
 
@@ -53561,6 +53569,9 @@
     <ol><li><p>Let <var title="">cache</var> be the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application
      cache</a> in <var title="">cache group</var>.</li>
 
+     <li><p>Let <var title="">task list</var> be an empty list of
+     <a href=#concept-task title=concept-task>tasks</a>.</p>
+
      <li>
 
       <p>For each entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
@@ -53568,14 +53579,15 @@
       either completely downloaded or failed.</p>
 
       <p>If the download failed (e.g. the connection times out, or the
-      user cancels the download), then <a href=#queue-a-task>queue a task</a> to
-      <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
+      user cancels the download), then create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple
+      event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
       <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
       host</a> the <code>Document</code> for this entry, if there
-      still is one. The default action of this event must be, if the
-      user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
-      some sort of user interface indicating to the user that the user
-      agent failed to save the application for offline use.</p>
+      still is one, and add it to <var title="">task list</var>. The
+      default action of this event must be, if the user agent
+      <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
+      user interface indicating to the user that the user agent failed
+      to save the application for offline use.</p>
 
       <p>Otherwise, associate the <code>Document</code> for this entry
       with <var title="">cache</var>; store the resource for this
@@ -53593,13 +53605,14 @@
 
      <li><p>For each <a href=#cache-host>cache host</a> associated with an
      <a href=#application-cache>application cache</a> 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> that is cancelable named <code title=event-appcache-noupdate><a href=#event-appcache-noupdate>noupdate</a></code> at the
+     group</var>, create a <a href=#concept-task title=concept-task>task</a> to
+     <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-noupdate><a href=#event-appcache-noupdate>noupdate</a></code> at the
      <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
-     host</a>. The default action of these events must be, if the
-     user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
-     some sort of user interface indicating to the user that the
-     application is up to date.</li>
+     host</a>, and add it to <var title="">task list</var>. The
+     default action of these events must be, if the user agent
+     <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
+     user interface indicating to the user that the application is up
+     to date.</li>
 
      <li><p>Empty <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
      entries</a>.</li>
@@ -53609,6 +53622,9 @@
 
      <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> be <i>idle</i>.</li>
 
+     <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-task title="queue a task">queue</a>
+     that task.</li>
+
      <li><p>Abort the <a href=#application-cache-download-process>application cache download
      process</a>.</li>
 
@@ -53906,31 +53922,32 @@
    <li><p>Set the <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> of
    <var title="">new cache</var> to <i>complete</i>.</li>
 
+   <li><p>Let <var title="">task list</var> be an empty list of <a href=#concept-task title=concept-task>tasks</a>.</p>
+
    <li>
 
     <p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache
     attempt</a>, then for each <a href=#cache-host>cache host</a> associated
     with an <a href=#application-cache>application cache</a> 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> that is cancelable named <code title=event-appcache-cached><a href=#event-appcache-cached>cached</a></code> at the
+    group</var>, create a <a href=#concept-task title=concept-task>task</a> to
+    <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-cached><a href=#event-appcache-cached>cached</a></code> at the
     <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
-    host</a>. The default action of these events must be, if the
-    user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
-    some sort of user interface indicating to the user that the
-    application has been cached and that they can now use it
-    offline.</p>
+    host</a>, and add it to <var title="">task list</var>. The
+    default action of these events must be, if the user agent
+    <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
+    user interface indicating to the user that the application has
+    been cached and that they can now use it offline.</p>
 
     <p>Otherwise, it is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>. For each
     <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application
-    cache</a> 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> that is cancelable
-    named <code title=event-appcache-updateready><a href=#event-appcache-updateready>updateready</a></code>
-    at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
-    host</a>. The default action of these events must be, if the
-    user agent <a href=#shows-caching-progress>shows caching progress</a>, 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>
+    cache</a> in <var title="">cache group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple
+    event</a> that is cancelable named <code title=event-appcache-updateready><a href=#event-appcache-updateready>updateready</a></code> at the
+    <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
+    host</a>, and add it to <var title="">task list</var>. The
+    default action of these events must be, if the user agent
+    <a href=#shows-caching-progress>shows caching progress</a>, 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>
 
    </li>
 
@@ -53941,10 +53958,15 @@
    status</a> of <var title="">cache group</var> to
    <i>idle</i>.</li>
 
+   <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-task title="queue a task">queue</a>
+   that task.</li>
+
   </ol><p>The <dfn id=cache-failure-steps>cache failure steps</dfn> are as follows:</p>
 
-  <ol><li>
+  <ol><li><p>Let <var title="">task list</var> be an empty list of <a href=#concept-task title=concept-task>tasks</a>.</p>
 
+   <li>
+
     <p>For each entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
     entries</a>, run the following further substeps. These steps
     may be run in parallel for two or more entries at a time.</p>
@@ -53955,26 +53977,28 @@
      <li><p>Unassociate the <code>Document</code> for this entry from
      its <a href=#application-cache>application cache</a>, if it has one.</li>
 
-     <li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
-     event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
+     <li><p>Create a <a href=#concept-task title=concept-task>task</a> to
+     <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
      <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
-     <code>Document</code> for this entry, if there still is one. The
-     default action of these events must be, if the user agent
-     <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
-     user interface indicating to the user that the user agent failed
-     to save the application for offline use.</p>
+     <code>Document</code> for this entry, if there still is one, and
+     add it to <var title="">task list</var>. The default action of
+     these events must be, if the user agent <a href=#shows-caching-progress>shows caching
+     progress</a>, the display of some sort of user interface
+     indicating to the user that the user agent failed to save the
+     application for offline use.</p>
 
     </ol></li>
 
    <li><p>For each <a href=#cache-host>cache host</a> still associated with an
    <a href=#application-cache>application cache</a> 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> that
-   is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
+   create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a
+   simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
    <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
-   host</a>. The default action of these events must be, if the
-   user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of some
-   sort of user interface indicating to the user that the user agent
-   failed to save the application for offline use.</li>
+   host</a>, and add it to <var title="">task list</var>. The
+   default action of these events must be, if the user agent
+   <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
+   user interface indicating to the user that the user agent failed to
+   save the application for offline use.</li>
 
    <li><p>Empty <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
    entries</a>.</li>
@@ -53994,6 +54018,9 @@
    attempt</a>, discard <var title="">cache group</var>
    altogether.</p>
 
+   <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-task title="queue a task">queue</a>
+   that task.</li>
+
    <li><p>Abort the <a href=#application-cache-download-process>application cache download
    process</a>.</li>
 
@@ -54010,6 +54037,7 @@
 
   <p>The <a href=#task-source>task source</a> for these <a href=#concept-task title=concept-task>tasks</a> is the <a href=#networking-task-source>networking task
   source</a>.</p>
+  
 
 
 

Modified: index
===================================================================
--- index	2009-10-18 23:11:25 UTC (rev 4171)
+++ index	2009-10-18 23:52:22 UTC (rev 4172)
@@ -50659,26 +50659,31 @@
      than the processing of <code>Document</code> objects already
      associated with an <a href=#application-cache>application cache</a> in the <var title="">cache group</var>.</li>
 
+     <li><p>Let <var title="">task list</var> be an empty list of
+     <a href=#concept-task title=concept-task>tasks</a>.</p>
+
      <li><p>For each <a href=#cache-host>cache host</a> associated with an
      <a href=#application-cache>application cache</a> 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> named <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code> that is
+     group</var>, create a <a href=#concept-task title=concept-task>task</a> to
+     <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code> that is
      cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
-     <a href=#cache-host>cache host</a>. The default action of these events must
-     be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the
-     display of some sort of user interface indicating to the user
-     that the application is no longer available for offline
-     use.</li>
+     <a href=#cache-host>cache host</a>, and add it to <var title="">task
+     list</var>. The default action of these events must be, if the
+     user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
+     some sort of user interface indicating to the user that the
+     application is no longer available for offline use.</li>
 
      <li><p>For each entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
-     entries</a>, <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
-     event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> (not <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code>!) at the
+     entries</a>, create a <a href=#concept-task title=concept-task>task</a>
+     to <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named
+     <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> (not <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code>!) at the
      <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
      host</a> the <code>Document</code> for this entry, if there
-     still is one. The default action of this event must be, if the
-     user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
-     some sort of user interface indicating to the user that the user
-     agent failed to save the application for offline use.</li>
+     still is one, and add it to <var title="">task list</var>. The
+     default action of this event must be, if the user agent
+     <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
+     user interface indicating to the user that the user agent failed
+     to save the application for offline use.</li>
 
      <li><p>If <var title="">cache group</var> has an
      <a href=#application-cache>application cache</a> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> is
@@ -50690,6 +50695,9 @@
 
      <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> be <i>idle</i>.</li>
 
+     <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-task title="queue a task">queue</a>
+     that task.</li>
+
      <li><p>Abort the <a href=#application-cache-download-process>application cache download
      process</a>.</li>
 
@@ -50720,6 +50728,9 @@
     <ol><li><p>Let <var title="">cache</var> be the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application
      cache</a> in <var title="">cache group</var>.</li>
 
+     <li><p>Let <var title="">task list</var> be an empty list of
+     <a href=#concept-task title=concept-task>tasks</a>.</p>
+
      <li>
 
       <p>For each entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
@@ -50727,14 +50738,15 @@
       either completely downloaded or failed.</p>
 
       <p>If the download failed (e.g. the connection times out, or the
-      user cancels the download), then <a href=#queue-a-task>queue a task</a> to
-      <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
+      user cancels the download), then create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple
+      event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
       <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
       host</a> the <code>Document</code> for this entry, if there
-      still is one. The default action of this event must be, if the
-      user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
-      some sort of user interface indicating to the user that the user
-      agent failed to save the application for offline use.</p>
+      still is one, and add it to <var title="">task list</var>. The
+      default action of this event must be, if the user agent
+      <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
+      user interface indicating to the user that the user agent failed
+      to save the application for offline use.</p>
 
       <p>Otherwise, associate the <code>Document</code> for this entry
       with <var title="">cache</var>; store the resource for this
@@ -50752,13 +50764,14 @@
 
      <li><p>For each <a href=#cache-host>cache host</a> associated with an
      <a href=#application-cache>application cache</a> 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> that is cancelable named <code title=event-appcache-noupdate><a href=#event-appcache-noupdate>noupdate</a></code> at the
+     group</var>, create a <a href=#concept-task title=concept-task>task</a> to
+     <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-noupdate><a href=#event-appcache-noupdate>noupdate</a></code> at the
      <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
-     host</a>. The default action of these events must be, if the
-     user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
-     some sort of user interface indicating to the user that the
-     application is up to date.</li>
+     host</a>, and add it to <var title="">task list</var>. The
+     default action of these events must be, if the user agent
+     <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
+     user interface indicating to the user that the application is up
+     to date.</li>
 
      <li><p>Empty <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
      entries</a>.</li>
@@ -50768,6 +50781,9 @@
 
      <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> be <i>idle</i>.</li>
 
+     <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-task title="queue a task">queue</a>
+     that task.</li>
+
      <li><p>Abort the <a href=#application-cache-download-process>application cache download
      process</a>.</li>
 
@@ -51065,31 +51081,32 @@
    <li><p>Set the <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> of
    <var title="">new cache</var> to <i>complete</i>.</li>
 
+   <li><p>Let <var title="">task list</var> be an empty list of <a href=#concept-task title=concept-task>tasks</a>.</p>
+
    <li>
 
     <p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache
     attempt</a>, then for each <a href=#cache-host>cache host</a> associated
     with an <a href=#application-cache>application cache</a> 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> that is cancelable named <code title=event-appcache-cached><a href=#event-appcache-cached>cached</a></code> at the
+    group</var>, create a <a href=#concept-task title=concept-task>task</a> to
+    <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-cached><a href=#event-appcache-cached>cached</a></code> at the
     <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
-    host</a>. The default action of these events must be, if the
-    user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
-    some sort of user interface indicating to the user that the
-    application has been cached and that they can now use it
-    offline.</p>
+    host</a>, and add it to <var title="">task list</var>. The
+    default action of these events must be, if the user agent
+    <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
+    user interface indicating to the user that the application has
+    been cached and that they can now use it offline.</p>
 
     <p>Otherwise, it is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>. For each
     <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application
-    cache</a> 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> that is cancelable
-    named <code title=event-appcache-updateready><a href=#event-appcache-updateready>updateready</a></code>
-    at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
-    host</a>. The default action of these events must be, if the
-    user agent <a href=#shows-caching-progress>shows caching progress</a>, 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>
+    cache</a> in <var title="">cache group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple
+    event</a> that is cancelable named <code title=event-appcache-updateready><a href=#event-appcache-updateready>updateready</a></code> at the
+    <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
+    host</a>, and add it to <var title="">task list</var>. The
+    default action of these events must be, if the user agent
+    <a href=#shows-caching-progress>shows caching progress</a>, 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>
 
    </li>
 
@@ -51100,10 +51117,15 @@
    status</a> of <var title="">cache group</var> to
    <i>idle</i>.</li>
 
+   <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-task title="queue a task">queue</a>
+   that task.</li>
+
   </ol><p>The <dfn id=cache-failure-steps>cache failure steps</dfn> are as follows:</p>
 
-  <ol><li>
+  <ol><li><p>Let <var title="">task list</var> be an empty list of <a href=#concept-task title=concept-task>tasks</a>.</p>
 
+   <li>
+
     <p>For each entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
     entries</a>, run the following further substeps. These steps
     may be run in parallel for two or more entries at a time.</p>
@@ -51114,26 +51136,28 @@
      <li><p>Unassociate the <code>Document</code> for this entry from
      its <a href=#application-cache>application cache</a>, if it has one.</li>
 
-     <li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
-     event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
+     <li><p>Create a <a href=#concept-task title=concept-task>task</a> to
+     <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
      <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
-     <code>Document</code> for this entry, if there still is one. The
-     default action of these events must be, if the user agent
-     <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
-     user interface indicating to the user that the user agent failed
-     to save the application for offline use.</p>
+     <code>Document</code> for this entry, if there still is one, and
+     add it to <var title="">task list</var>. The default action of
+     these events must be, if the user agent <a href=#shows-caching-progress>shows caching
+     progress</a>, the display of some sort of user interface
+     indicating to the user that the user agent failed to save the
+     application for offline use.</p>
 
     </ol></li>
 
    <li><p>For each <a href=#cache-host>cache host</a> still associated with an
    <a href=#application-cache>application cache</a> 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> that
-   is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
+   create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a
+   simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
    <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
-   host</a>. The default action of these events must be, if the
-   user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of some
-   sort of user interface indicating to the user that the user agent
-   failed to save the application for offline use.</li>
+   host</a>, and add it to <var title="">task list</var>. The
+   default action of these events must be, if the user agent
+   <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
+   user interface indicating to the user that the user agent failed to
+   save the application for offline use.</li>
 
    <li><p>Empty <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
    entries</a>.</li>
@@ -51153,6 +51177,9 @@
    attempt</a>, discard <var title="">cache group</var>
    altogether.</p>
 
+   <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-task title="queue a task">queue</a>
+   that task.</li>
+
    <li><p>Abort the <a href=#application-cache-download-process>application cache download
    process</a>.</li>
 
@@ -51169,6 +51196,7 @@
 
   <p>The <a href=#task-source>task source</a> for these <a href=#concept-task title=concept-task>tasks</a> is the <a href=#networking-task-source>networking task
   source</a>.</p>
+  
 
 
 

Modified: source
===================================================================
--- source	2009-10-18 23:11:25 UTC (rev 4171)
+++ source	2009-10-18 23:52:22 UTC (rev 4172)
@@ -60290,30 +60290,34 @@
      associated with an <span>application cache</span> in the <var
      title="">cache group</var>.</p></li>
 
+     <li><p>Let <var title="">task list</var> be an empty list of
+     <span title="concept-task">tasks</span>.</p>
+
      <li><p>For each <span>cache host</span> associated with an
      <span>application cache</span> in <var title="">cache
-     group</var>, <span>queue a task</span> to <span>fire a simple
-     event</span> named <code
+     group</var>, create a <span title="concept-task">task</span> to
+     <span>fire a simple event</span> named <code
      title="event-appcache-obsolete">obsolete</code> that is
      cancelable at the <code>ApplicationCache</code> singleton of the
-     <span>cache host</span>. The default action of these events must
-     be, if the user agent <span>shows caching progress</span>, the
-     display of some sort of user interface indicating to the user
-     that the application is no longer available for offline
-     use.</p></li>
+     <span>cache host</span>, and add it to <var title="">task
+     list</var>. The default action of these events must be, if the
+     user agent <span>shows caching progress</span>, the display of
+     some sort of user interface indicating to the user that the
+     application is no longer available for offline use.</p></li>
 
      <li><p>For each entry in <var title="">cache group</var>'s <span
      title="concept-appcache-pending-masters">list of pending master
-     entries</span>, <span>queue a task</span> to <span>fire a simple
-     event</span> that is cancelable named <code
-     title="event-appcache-error">error</code> (not <code
+     entries</span>, create a <span title="concept-task">task</span>
+     to <span>fire a simple event</span> that is cancelable named
+     <code title="event-appcache-error">error</code> (not <code
      title="event-appcache-obsolete">obsolete</code>!) at the
      <code>ApplicationCache</code> singleton of the <span>cache
      host</span> the <code>Document</code> for this entry, if there
-     still is one. The default action of this event must be, if the
-     user agent <span>shows caching progress</span>, the display of
-     some sort of user interface indicating to the user that the user
-     agent failed to save the application for offline use.</p></li>
+     still is one, and add it to <var title="">task list</var>. The
+     default action of this event must be, if the user agent
+     <span>shows caching progress</span>, the display of some sort of
+     user interface indicating to the user that the user agent failed
+     to save the application for offline use.</p></li>
 
      <li><p>If <var title="">cache group</var> has an
      <span>application cache</span> whose <span
@@ -60328,6 +60332,10 @@
      title="concept-appcache-status">status</span> of <var
      title="">cache group</var> be <i>idle</i>.</p></li>
 
+     <li><p>For each <span title="concept-task">task</span> in <var
+     title="">task list</var>, <span title="queue a task">queue</span>
+     that task.</p></li>
+
      <li><p>Abort the <span>application cache download
      process</span>.</p></li>
 
@@ -60366,6 +60374,9 @@
      title="concept-appcache-newer">newest</span> <span>application
      cache</span> in <var title="">cache group</var>.</p></li>
 
+     <li><p>Let <var title="">task list</var> be an empty list of
+     <span title="concept-task">tasks</span>.</p>
+
      <li>
 
       <p>For each entry in <var title="">cache group</var>'s <span
@@ -60374,15 +60385,17 @@
       either completely downloaded or failed.</p>
 
       <p>If the download failed (e.g. the connection times out, or the
-      user cancels the download), then <span>queue a task</span> to
-      <span>fire a simple event</span> that is cancelable named <code
+      user cancels the download), then create a <span
+      title="concept-task">task</span> to <span>fire a simple
+      event</span> that is cancelable named <code
       title="event-appcache-error">error</code> at the
       <code>ApplicationCache</code> singleton of the <span>cache
       host</span> the <code>Document</code> for this entry, if there
-      still is one. The default action of this event must be, if the
-      user agent <span>shows caching progress</span>, the display of
-      some sort of user interface indicating to the user that the user
-      agent failed to save the application for offline use.</p>
+      still is one, and add it to <var title="">task list</var>. The
+      default action of this event must be, if the user agent
+      <span>shows caching progress</span>, the display of some sort of
+      user interface indicating to the user that the user agent failed
+      to save the application for offline use.</p>
 
       <p>Otherwise, associate the <code>Document</code> for this entry
       with <var title="">cache</var>; store the resource for this
@@ -60403,14 +60416,15 @@
 
      <li><p>For each <span>cache host</span> associated with an
      <span>application cache</span> in <var title="">cache
-     group</var>, <span>queue a task</span> to <span>fire a simple
-     event</span> that is cancelable named <code
+     group</var>, create a <span title="concept-task">task</span> to
+     <span>fire a simple event</span> that is cancelable named <code
      title="event-appcache-noupdate">noupdate</code> at the
      <code>ApplicationCache</code> singleton of the <span>cache
-     host</span>. The default action of these events must be, if the
-     user agent <span>shows caching progress</span>, the display of
-     some sort of user interface indicating to the user that the
-     application is up to date.</p></li>
+     host</span>, and add it to <var title="">task list</var>. The
+     default action of these events must be, if the user agent
+     <span>shows caching progress</span>, the display of some sort of
+     user interface indicating to the user that the application is up
+     to date.</p></li>
 
      <li><p>Empty <var title="">cache group</var>'s <span
      title="concept-appcache-pending-masters">list of pending master
@@ -60423,6 +60437,10 @@
      title="concept-appcache-status">status</span> of <var
      title="">cache group</var> be <i>idle</i>.</p></li>
 
+     <li><p>For each <span title="concept-task">task</span> in <var
+     title="">task list</var>, <span title="queue a task">queue</span>
+     that task.</p></li>
+
      <li><p>Abort the <span>application cache download
      process</span>.</p></li>
 
@@ -60771,33 +60789,37 @@
    title="concept-appcache-completeness">completeness flag</span> of
    <var title="">new cache</var> to <i>complete</i>.</p></li>
 
+   <li><p>Let <var title="">task list</var> be an empty list of <span
+   title="concept-task">tasks</span>.</p>
+
    <li>
 
     <p>If this is a <span title="concept-appcache-cache">cache
     attempt</span>, then for each <span>cache host</span> associated
     with an <span>application cache</span> in <var title="">cache
-    group</var>, <span>queue a task</span> to <span>fire a simple
-    event</span> that is cancelable named <code
+    group</var>, create a <span title="concept-task">task</span> to
+    <span>fire a simple event</span> that is cancelable named <code
     title="event-appcache-cached">cached</code> at the
     <code>ApplicationCache</code> singleton of the <span>cache
-    host</span>. The default action of these events must be, if the
-    user agent <span>shows caching progress</span>, the display of
-    some sort of user interface indicating to the user that the
-    application has been cached and that they can now use it
-    offline.</p>
+    host</span>, and add it to <var title="">task list</var>. The
+    default action of these events must be, if the user agent
+    <span>shows caching progress</span>, the display of some sort of
+    user interface indicating to the user that the application has
+    been cached and that they can now use it offline.</p>
 
     <p>Otherwise, it is an <span
     title="concept-appcache-upgrade">upgrade attempt</span>. For each
     <span>cache host</span> associated with an <span>application
-    cache</span> in <var title="">cache group</var>, <span>queue a
-    task</span> to <span>fire a simple event</span> that is cancelable
-    named <code title="event-appcache-updateready">updateready</code>
-    at the <code>ApplicationCache</code> singleton of the <span>cache
-    host</span>. The default action of these events must be, if the
-    user agent <span>shows caching progress</span>, 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>
+    cache</span> in <var title="">cache group</var>, create a <span
+    title="concept-task">task</span> to <span>fire a simple
+    event</span> that is cancelable named <code
+    title="event-appcache-updateready">updateready</code> at the
+    <code>ApplicationCache</code> singleton of the <span>cache
+    host</span>, and add it to <var title="">task list</var>. The
+    default action of these events must be, if the user agent
+    <span>shows caching progress</span>, 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>
 
    </li>
 
@@ -60808,12 +60830,19 @@
    status</span> of <var title="">cache group</var> to
    <i>idle</i>.</p></li>
 
+   <li><p>For each <span title="concept-task">task</span> in <var
+   title="">task list</var>, <span title="queue a task">queue</span>
+   that task.</p></li>
+
   </ol>
 
   <p>The <dfn>cache failure steps</dfn> are as follows:</p>
 
   <ol>
 
+   <li><p>Let <var title="">task list</var> be an empty list of <span
+   title="concept-task">tasks</span>.</p>
+
    <li>
 
     <p>For each entry in <var title="">cache group</var>'s <span
@@ -60829,15 +60858,16 @@
      <li><p>Unassociate the <code>Document</code> for this entry from
      its <span>application cache</span>, if it has one.</p></li>
 
-     <li><p><span>Queue a task</span> to <span>fire a simple
-     event</span> that is cancelable named <code
+     <li><p>Create a <span title="concept-task">task</span> to
+     <span>fire a simple event</span> that is cancelable named <code
      title="event-appcache-error">error</code> at the
      <code>ApplicationCache</code> singleton of the
-     <code>Document</code> for this entry, if there still is one. The
-     default action of these events must be, if the user agent
-     <span>shows caching progress</span>, the display of some sort of
-     user interface indicating to the user that the user agent failed
-     to save the application for offline use.</p>
+     <code>Document</code> for this entry, if there still is one, and
+     add it to <var title="">task list</var>. The default action of
+     these events must be, if the user agent <span>shows caching
+     progress</span>, the display of some sort of user interface
+     indicating to the user that the user agent failed to save the
+     application for offline use.</p>
 
     </ol>
 
@@ -60845,14 +60875,15 @@
 
    <li><p>For each <span>cache host</span> still associated with an
    <span>application cache</span> in <var title="">cache group</var>,
-   <span>queue a task</span> to <span>fire a simple event</span> that
-   is cancelable named <code
+   create a <span title="concept-task">task</span> to <span>fire a
+   simple event</span> that is cancelable named <code
    title="event-appcache-error">error</code> at the
    <code>ApplicationCache</code> singleton of the <span>cache
-   host</span>. The default action of these events must be, if the
-   user agent <span>shows caching progress</span>, the display of some
-   sort of user interface indicating to the user that the user agent
-   failed to save the application for offline use.</p></li>
+   host</span>, and add it to <var title="">task list</var>. The
+   default action of these events must be, if the user agent
+   <span>shows caching progress</span>, the display of some sort of
+   user interface indicating to the user that the user agent failed to
+   save the application for offline use.</p></li>
 
    <li><p>Empty <var title="">cache group</var>'s <span
    title="concept-appcache-pending-masters">list of pending master
@@ -60874,6 +60905,10 @@
    attempt</span>, discard <var title="">cache group</var>
    altogether.</p>
 
+   <li><p>For each <span title="concept-task">task</span> in <var
+   title="">task list</var>, <span title="queue a task">queue</span>
+   that task.</p></li>
+
    <li><p>Abort the <span>application cache download
    process</span>.</p></li>
 
@@ -60895,6 +60930,7 @@
   <p>The <span>task source</span> for these <span
   title="concept-task">tasks</span> is the <span>networking task
   source</span>.</p>
+  
 
 
 




More information about the Commit-Watchers mailing list