HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2914

File a bug

SVNBugCommentTime (UTC)
2914Rename navigator.releaseLocks() to navigator.getStorageUpdates(); make the network layer's seting of cookies grab the lock.2009-03-26 00:41
Index: source
===================================================================
--- source	(revision 2913)
+++ source	(revision 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>

|