HTML Standard Tracker

Filter

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
@@ -4599,20 +4599,43 @@
     <p>Otherwise, at a time convenient to the user and the user agent,
     download (or otherwise obtain) the resource, applying the
     semantics of the relevant specifications (e.g. performing an HTTP
     GET or POST operation, or reading the file from disk, following
     redirects, <span title="concept-js-deref">dereferencing <span
     title="javascript protocol"><code title="">javascript:</code>
     URLs</span></span>, etc).</p>
 
    </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
    interlaced JPEG or an HTML file, multiple tasks may be queued to
    process the data as it is downloaded. The <span>task source</span>
    for these tasks is the <span>networking task source</span>.</p>
    <!-- XXX make sure each use of 'fetch' defines what the appropriate
    task is -->
 
   </ol>
@@ -45700,21 +45723,22 @@ interface <dfn>Window</dfn> {
   interaction task source</span>), and another for everything
   else. The user agent could then give keyboard and mouse events
   preference over other tasks three quarters of the time, keeping the
   interface responsive but not starving other task queues, and never
   processing events from any one <span>task source</span> out of
   order.</p>
 
   <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>
 
   <p>An <span>event loop</span> must continually run through the
   following steps for as long as it exists:</p>
 
   <ol>
 
    <li><p>Run the oldest <span title="concept-task">task</span> on one
@@ -47133,21 +47157,21 @@ interface <dfn>Function</dfn> {
 };
 
 [NoInterfaceObject, ImplementedOn=<span>Navigator</span>] interface <dfn>NavigatorOnLine</dfn> {
   readonly attribute boolean <span title="dom-navigator-onLine">onLine</span>;
 };
 
 [NoInterfaceObject, ImplementedOn=<span>Navigator</span>] interface <dfn>NavigatorAbilities</dfn> {
   // 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>;
   (the latter is used in a <video> element demo now)
 -->};</pre>
 
   <div class="impl">
 
   <p>Objects implementing the <code>Navigator</code> interface must
   also implement the <span>NavigatorID</span>,
@@ -47449,61 +47473,20 @@ interface <dfn>Function</dfn> {
   applications.</p>
 
   <p>UAs must not use registered content handlers to handle content
   that was returned as part of a non-GET transaction (or rather, as
   part of any non-idempotent transaction), as the remote site would
   not be able to fetch the same data.</p>
 
   </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
   particular privacy concerns.</p>
 
   <p><strong>Hijacking all Web usage.</strong> User agents should not
   allow protocols that are key to its normal operation, such as
   <code>http</code> or <code>https</code>, to be rerouted through
@@ -47667,20 +47650,61 @@ interface <dfn>Function</dfn> {
 
   <p>The <code
   title="dom-navigator-registerContentHandler">registerContentHandler()</code>
   method would work equivalently, but for unknown MIME types instead
   of unknown protocols.</p>
 
   </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-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>
 
   <p><em>This section is non-normative.</em></p>
 
   <p class="XXX">...</p>
 
 
   <div class="impl">

|