Short URL: http://html5.org/r/2901
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 2901 | navigator.releaseLock() | 2009-03-24 08:45 |
Index: source
===================================================================
--- source (revision 2900)
+++ source (revision 2901)
@@ -47050,6 +47050,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>();
<!-- 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>;
@@ -47061,9 +47062,9 @@
<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 -->
@@ -47365,8 +47366,49 @@
</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