HTML Standard Tracker


File a bug

SVNBugCommentTime (UTC)
2901navigator.releaseLock()2009-03-24 08:45
@@ -47043,34 +47043,35 @@ 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>();
 <!--  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)
   <div class="impl">
   <p>Objects implementing the <code>Navigator</code> interface must
   also implement the <span>NavigatorID</span>,
   <span>NavigatorOnLine</span>, and
-  <span>NavigatorAbilities</span> interfaces. (These
-  interfaces are defined separately so that other specifications can
-  re-use parts of the <code>Navigator</code> interface.)</p>
+  <span>NavigatorAbilities</span> interfaces. (These interfaces are
+  defined separately so that other specifications can re-use parts of
+  the <code>Navigator</code> interface.)</p>
    <!-- XXX also, see window.external.AddSearchProvider() and similar DOM APIs from IE -->
    <!-- XXX also, could expose languages:
    <dt><dfn title="dom-navigator-browserLanguage"><code>browserLanguage</code></dfn></dt> <!- - Opera and IE only - ->
    <dd><p>Must return either null or a language code representing the language the browser uses in its interface.</p></dd>
    <dt><dfn title="dom-navigator-userLanguage"><code>userLanguage</code></dfn></dt> <!- - Opera and IE only - ->
    <dt><dfn title="dom-navigator-language"><code>language</code></dfn></dt> <!- - Opera, Safari, and Mozilla only - ->
    <dd><p>Must return either null or a language code representing the user's preferred language.</p></dd>
@@ -47358,20 +47359,61 @@ interface <dfn>Function</dfn> {
   <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>
+  <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