[html5] r2914 - [] (0) Rename navigator.releaseLocks() to navigator.getStorageUpdates(); make th [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Mar 25 17:41:41 PDT 2009


Author: ianh
Date: 2009-03-25 17:41:40 -0700 (Wed, 25 Mar 2009)
New Revision: 2914

Modified:
   index
   source
Log:
[] (0) Rename navigator.releaseLocks() to navigator.getStorageUpdates(); make the network layer's seting of cookies grab the lock.

Modified: index
===================================================================
--- index	2009-03-25 23:57:19 UTC (rev 2913)
+++ index	2009-03-26 00:41:40 UTC (rev 2914)
@@ -39,7 +39,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 25 March 2009</h2>
+   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 26 March 2009</h2>
    <p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <dl><dt>Multiple-page version:</dt>
@@ -708,11 +708,11 @@
    <li><a href=#system-state-and-capabilities><span class=secno>5.7 </span>System state and capabilities</a>
     <ol>
      <li><a href=#client-identification><span class=secno>5.7.1 </span>Client identification</a></li>
-     <li><a href=#custom-handlers><span class=secno>5.7.2 </span>Custom protocol and content handlers</a></li>
-     <li><a href=#manually-releasing-the-storage-mutex><span class=secno>5.7.3 </span>Manually releasing the storage mutex</a>
+     <li><a href=#custom-handlers><span class=secno>5.7.2 </span>Custom protocol and content handlers</a>
       <ol>
-       <li><a href=#security-and-privacy><span class=secno>5.7.3.1 </span>Security and privacy</a></li>
-       <li><a href=#sample-handler-impl><span class=secno>5.7.3.2 </span>Sample user interface</a></ol></ol></li>
+       <li><a href=#security-and-privacy><span class=secno>5.7.2.1 </span>Security and privacy</a></li>
+       <li><a href=#sample-handler-impl><span class=secno>5.7.2.2 </span>Sample user interface</a></ol></li>
+     <li><a href=#manually-releasing-the-storage-mutex><span class=secno>5.7.3 </span>Manually releasing the storage mutex</a></ol></li>
    <li><a href=#offline><span class=secno>5.8 </span>Offline Web applications</a>
     <ol>
      <li><a href=#introduction-2><span class=secno>5.8.1 </span>Introduction</a></li>
@@ -4896,6 +4896,23 @@
 
    </li>
 
+   <li>
+
+    <p>If there are cookies to be set, then the user agent must run
+    the following substeps:</p>
+
+    <ol><li><p>Wait until ownership of the <a href=#storage-mutex>storage mutex</a> can
+     be taken by this instance of the <a href=#fetch title=fetch>fetching</a> algorithm.</li>
+
+     <li><p>Take ownership of the <a href=#storage-mutex>storage mutex</a>.</li>
+
+     <li><p>Update the cookies. <a href=#refsCOOKIES>[COOKIES]</a></li>
+
+     <li><p>Release the <a href=#storage-mutex>storage mutex</a> so that it is once
+     again free.</li>
+
+    </ol></li>
+
    <li><p>When the resource is available, <a href=#queue-a-task>queue a task</a>
    that uses the resource as appropriate. If the resource can be
    processed incrementally, as, for instance, with a progressively
@@ -40291,7 +40308,8 @@
   <p>A user agent is required to have one <dfn id=storage-mutex>storage
   mutex</dfn>. This mutex is used to control access to shared state
   like cookies. At any one point, the <a href=#storage-mutex>storage mutex</a> is
-  either free, or owned by a particular <a href=#event-loop>event loop</a>.</p>
+  either free, or owned by a particular <a href=#event-loop>event loop</a> or
+  instance of the <a href=#fetch title=fetch>fetching</a> algorithm.</p>
 
 
   <h5 id=processing-model-2><span class=secno>5.5.4.2 </span>Processing model</h5>
@@ -41505,7 +41523,7 @@
   // content handler registration
   void <a href=#dom-navigator-registerprotocolhandler title=dom-navigator-registerProtocolHandler>registerProtocolHandler</a>(in DOMString protocol, in DOMString url, in DOMString title);
   void <a href=#dom-navigator-registercontenthandler title=dom-navigator-registerContentHandler>registerContentHandler</a>(in DOMString mimeType, in DOMString url, in DOMString title);
-  void <a href=#dom-navigator-releaselock title=dom-navigator-releaseLock>releaseLock</a>();
+  void <a href=#dom-navigator-getstorageupdates title=dom-navigator-getStorageUpdates>getStorageUpdates</a>();
 <!--  XXX cookieEnabled geolocator javaEnabled mozIsLocallyAvailable preference
   readonly attribute <span>MimeTypeArray</span> <span title="dom-navigator-mimeTypes">mimeTypes</span>;
   readonly attribute <span>PluginArray</span> <span title="dom-navigator-plugins">plugins</span>;
@@ -41784,42 +41802,9 @@
   </div>
 
 
-  <h4 id=manually-releasing-the-storage-mutex><span class=secno>5.7.3 </span>Manually releasing the storage mutex</h4>
-
-  <dl class=domintro><dt><var title="">window</var> . <code title=dom-navigator><a href=#dom-navigator>navigator</a></code> . <code title=dom-navigator-releaseLock><a href=#dom-navigator-releaselock>releaseLock</a></code>()</dt>
-
-   <dd>
-
-    <p>If a script uses the <code title=dom-document-cookie><a href=#dom-document-cookie>document.cookie</a></code> API, or the
-    <code title=dom-localStorage>localStorage</code> API, the
-    browser will block other scripts from accessing cookies or storage
-    until the first script finishes.</p>
-
-    <p>Calling the <code title=dom-navigator-releaseLock><a href=#dom-navigator-releaselock>navigator.releaseLock()</a></code>
-    method tells the user agent to unblock any other scripts that may
-    be blocked, even though the script hasn't returned.</p>
-
-    <p>Values of cookies and items in the <code>Storage</code> objects
-    of <code title=dom-localStorage>localStorage</code> attributes
-    can change after calling this method.</p>
-
-   </dd>
-
-  </dl><div class=impl>
-
-   <p>The <dfn id=dom-navigator-releaselock title=dom-navigator-releaseLock><code>releaseLock()</code></dfn>
-   method, when invoked, must, if the <a href=#storage-mutex>storage mutex</a> is
-   owned by the <a href=#event-loop>event loop</a> of the <a href=#concept-task title=concept-task>task</a> that resulted in the method being
-   called, release the <a href=#storage-mutex>storage mutex</a> so that it is once
-   again free. Otherwise, it must do nothing.</p>
-
-  </div>
-
-
-
   <div class=impl>
 
-  <h5 id=security-and-privacy><span class=secno>5.7.3.1 </span>Security and privacy</h5>
+  <h5 id=security-and-privacy><span class=secno>5.7.2.1 </span>Security and privacy</h5>
 
   <p>These mechanisms can introduce a number of concerns, in
   particular privacy concerns.</p>
@@ -41903,7 +41888,7 @@
 
   <div class=impl>
 
-  <h5 id=sample-handler-impl><span class=secno>5.7.3.2 </span>Sample user interface</h5>
+  <h5 id=sample-handler-impl><span class=secno>5.7.2.2 </span>Sample user interface</h5>
 
   <p><em>This section is non-normative.</em></p>
 
@@ -41985,6 +41970,39 @@
 
 
 
+  <h4 id=manually-releasing-the-storage-mutex><span class=secno>5.7.3 </span>Manually releasing the storage mutex</h4>
+
+  <dl class=domintro><dt><var title="">window</var> . <code title=dom-navigator><a href=#dom-navigator>navigator</a></code> . <code title=dom-navigator-getStorageUpdates><a href=#dom-navigator-getstorageupdates>getStorageUpdates</a></code>()</dt>
+
+   <dd>
+
+    <p>If a script uses the <code title=dom-document-cookie><a href=#dom-document-cookie>document.cookie</a></code> API, or the
+    <code title=dom-localStorage>localStorage</code> API, the
+    browser will block other scripts from accessing cookies or storage
+    until the first script finishes.</p>
+
+    <p>Calling the <code title=dom-navigator-getStorageUpdates><a href=#dom-navigator-getstorageupdates>navigator.getStorageUpdates()</a></code>
+    method tells the user agent to unblock any other scripts that may
+    be blocked, even though the script hasn't returned.</p>
+
+    <p>Values of cookies and items in the <code>Storage</code> objects
+    of <code title=dom-localStorage>localStorage</code> attributes
+    can change after calling this method, whence its name.</p>
+
+   </dd>
+
+  </dl><div class=impl>
+
+   <p>The <dfn id=dom-navigator-getstorageupdates title=dom-navigator-getStorageUpdates><code>getStorageUpdates()</code></dfn>
+   method, when invoked, must, if the <a href=#storage-mutex>storage mutex</a> is
+   owned by the <a href=#event-loop>event loop</a> of the <a href=#concept-task title=concept-task>task</a> that resulted in the method being
+   called, release the <a href=#storage-mutex>storage mutex</a> so that it is once
+   again free. Otherwise, it must do nothing.</p>
+
+  </div>
+
+
+
   <h3 id=offline><span class=secno>5.8 </span>Offline Web applications</h3>
 
   <h4 id=introduction-2><span class=secno>5.8.1 </span>Introduction</h4>

Modified: source
===================================================================
--- source	2009-03-25 23:57:19 UTC (rev 2913)
+++ source	2009-03-26 00:41:40 UTC (rev 2914)
@@ -4606,6 +4606,29 @@
 
    </li>
 
+   <li>
+
+    <p>If there are cookies to be set, then the user agent must run
+    the following substeps:</p>
+
+    <ol>
+
+     <li><p>Wait until ownership of the <span>storage mutex</span> can
+     be taken by this instance of the <span
+     title="fetch">fetching</span> algorithm.</p></li>
+
+     <li><p>Take ownership of the <span>storage mutex</span>.</p></li>
+
+     <li><p>Update the cookies. <a
+     href="#refsCOOKIES">[COOKIES]</a></p></li>
+
+     <li><p>Release the <span>storage mutex</span> so that it is once
+     again free.</p></li>
+
+    </ol>
+
+   </li>
+
    <li><p>When the resource is available, <span>queue a task</span>
    that uses the resource as appropriate. If the resource can be
    processed incrementally, as, for instance, with a progressively
@@ -45707,7 +45730,8 @@
   <p>A user agent is required to have one <dfn>storage
   mutex</dfn>. This mutex is used to control access to shared state
   like cookies. At any one point, the <span>storage mutex</span> is
-  either free, or owned by a particular <span>event loop</span>.</p>
+  either free, or owned by a particular <span>event loop</span> or
+  instance of the <span title="fetch">fetching</span> algorithm.</p>
 
 
   <h5>Processing model</h5>
@@ -47140,7 +47164,7 @@
   // content handler registration
   void <span title="dom-navigator-registerProtocolHandler">registerProtocolHandler</span>(in DOMString protocol, in DOMString url, in DOMString title);
   void <span title="dom-navigator-registerContentHandler">registerContentHandler</span>(in DOMString mimeType, in DOMString url, in DOMString title);
-  void <span title="dom-navigator-releaseLock">releaseLock</span>();
+  void <span title="dom-navigator-getStorageUpdates">getStorageUpdates</span>();
 <!--  XXX cookieEnabled geolocator javaEnabled mozIsLocallyAvailable preference
   readonly attribute <span>MimeTypeArray</span> <span title="dom-navigator-mimeTypes">mimeTypes</span>;
   readonly attribute <span>PluginArray</span> <span title="dom-navigator-plugins">plugins</span>;
@@ -47456,49 +47480,8 @@
   </div>
 
 
-  <h4>Manually releasing the storage mutex</h4>
-
-  <dl class="domintro">
-
-   <dt><var title="">window</var> . <code title="dom-navigator">navigator</code> . <code title="dom-navigator-releaseLock">releaseLock</code>()</dt>
-
-   <dd>
-
-    <p>If a script uses the <code
-    title="dom-document-cookie">document.cookie</code> API, or the
-    <code title="dom-localStorage">localStorage</code> API, the
-    browser will block other scripts from accessing cookies or storage
-    until the first script finishes.</p>
-
-    <p>Calling the <code
-    title="dom-navigator-releaseLock">navigator.releaseLock()</code>
-    method tells the user agent to unblock any other scripts that may
-    be blocked, even though the script hasn't returned.</p>
-
-    <p>Values of cookies and items in the <code>Storage</code> objects
-    of <code title="dom-localStorage">localStorage</code> attributes
-    can change after calling this method.</p>
-
-   </dd>
-
-  </dl>
-
   <div class="impl">
 
-   <p>The <dfn
-   title="dom-navigator-releaseLock"><code>releaseLock()</code></dfn>
-   method, when invoked, must, if the <span>storage mutex</span> is
-   owned by the <span>event loop</span> of the <span
-   title="concept-task">task</span> that resulted in the method being
-   called, release the <span>storage mutex</span> so that it is once
-   again free. Otherwise, it must do nothing.</p>
-
-  </div>
-
-
-
-  <div class="impl">
-
   <h5>Security and privacy</h5>
 
   <p>These mechanisms can introduce a number of concerns, in
@@ -47674,6 +47657,47 @@
 
 
 
+  <h4>Manually releasing the storage mutex</h4>
+
+  <dl class="domintro">
+
+   <dt><var title="">window</var> . <code title="dom-navigator">navigator</code> . <code title="dom-navigator-getStorageUpdates">getStorageUpdates</code>()</dt>
+
+   <dd>
+
+    <p>If a script uses the <code
+    title="dom-document-cookie">document.cookie</code> API, or the
+    <code title="dom-localStorage">localStorage</code> API, the
+    browser will block other scripts from accessing cookies or storage
+    until the first script finishes.</p>
+
+    <p>Calling the <code
+    title="dom-navigator-getStorageUpdates">navigator.getStorageUpdates()</code>
+    method tells the user agent to unblock any other scripts that may
+    be blocked, even though the script hasn't returned.</p>
+
+    <p>Values of cookies and items in the <code>Storage</code> objects
+    of <code title="dom-localStorage">localStorage</code> attributes
+    can change after calling this method, whence its name.</p>
+
+   </dd>
+
+  </dl>
+
+  <div class="impl">
+
+   <p>The <dfn
+   title="dom-navigator-getStorageUpdates"><code>getStorageUpdates()</code></dfn>
+   method, when invoked, must, if the <span>storage mutex</span> is
+   owned by the <span>event loop</span> of the <span
+   title="concept-task">task</span> that resulted in the method being
+   called, release the <span>storage mutex</span> so that it is once
+   again free. Otherwise, it must do nothing.</p>
+
+  </div>
+
+
+
   <h3 id="offline">Offline Web applications</h3>
 
   <h4>Introduction</h4>




More information about the Commit-Watchers mailing list