Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[] (0) navigator.releaseLock()
git-svn-id: http://svn.whatwg.org/webapps@2901 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 24, 2009
1 parent 8c26c79 commit c25f356
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 11 deletions.
51 changes: 43 additions & 8 deletions index
Expand Up @@ -708,10 +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><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>
<ol>
<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></ol></li>
<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=#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>
Expand Down Expand Up @@ -41431,6 +41432,7 @@ interface <dfn id=function>Function</dfn> {
// 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>();
<!-- 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>;
Expand All @@ -41442,9 +41444,9 @@ interface <dfn id=function>Function</dfn> {
<p>Objects implementing the <code><a href=#navigator>Navigator</a></code> interface must
also implement the <a href=#navigatorid>NavigatorID</a>,
<a href=#navigatoronline>NavigatorOnLine</a>, and
<a href=#navigatorabilities>NavigatorAbilities</a> interfaces. (These
interfaces are defined separately so that other specifications can
re-use parts of the <code><a href=#navigator>Navigator</a></code> interface.)</p>
<a href=#navigatorabilities>NavigatorAbilities</a> interfaces. (These interfaces are
defined separately so that other specifications can re-use parts of
the <code><a href=#navigator>Navigator</a></code> interface.)</p>

<!-- XXX also, see window.external.AddSearchProvider() and similar DOM APIs from IE -->

Expand Down Expand Up @@ -41709,9 +41711,42 @@ interface <dfn id=function>Function</dfn> {
</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.2.1 </span>Security and privacy</h5>
<h5 id=security-and-privacy><span class=secno>5.7.3.1 </span>Security and privacy</h5>

<p>These mechanisms can introduce a number of concerns, in
particular privacy concerns.</p>
Expand Down Expand Up @@ -41795,7 +41830,7 @@ interface <dfn id=function>Function</dfn> {

<div class=impl>

<h5 id=sample-handler-impl><span class=secno>5.7.2.2 </span>Sample user interface</h5>
<h5 id=sample-handler-impl><span class=secno>5.7.3.2 </span>Sample user interface</h5>

<p><em>This section is non-normative.</em></p>

Expand Down
48 changes: 45 additions & 3 deletions source
Expand Up @@ -47050,6 +47050,7 @@ interface <dfn>Function</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>;
Expand All @@ -47061,9 +47062,9 @@ interface <dfn>Function</dfn> {
<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 -->

Expand Down Expand Up @@ -47365,6 +47366,47 @@ interface <dfn>Function</dfn> {
</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>
Expand Down

0 comments on commit c25f356

Please sign in to comment.