Skip to content

Commit

Permalink
[giow] (2) document.load() - prevent reentrancy in the sync case, and…
Browse files Browse the repository at this point in the history
… minor fixes.

git-svn-id: http://svn.whatwg.org/webapps@5202 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 27, 2010
1 parent 58d12c7 commit e70e6f4
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 11 deletions.
21 changes: 17 additions & 4 deletions complete.html
Expand Up @@ -8742,13 +8742,22 @@ <h4 id=loading-xml-documents><span class=secno>3.1.6 </span>Loading XML document
<p>The <dfn id=dom-xmldocumentloader-load title=dom-XMLDocumentLoader-load><code>load(<var title="">url</var>)</code></dfn> method must run the following
steps:</p>

<ol><li><p>Let <var title="">document</var> be the <code><a href=#document>Document</a></code>
object on which the method was invoked.</p>~</li>
<ol><li><p>If <code title=dom-XMLDocumentLoader-async><a href=#dom-xmldocumentloader-async>async</a></code> is
set to false and the <var title="">document</var> is
<a href=#load-blocked>load-blocked</a>, return false and abort these
steps.</li>

<li><p>Let <var title="">document</var> be the <code><a href=#document>Document</a></code>
object on which the method was invoked.</li>

<li><p>If the <a href=#origin>origin</a> of <var title="">url</var> is not
the same as the <a href=#origin>origin</a> of <var title="">document</var>, throw a <code><a href=#security_err>SECURITY_ERR</a></code>
exception.</li>

<li><p>If <code title=dom-XMLDocumentLoader-async><a href=#dom-xmldocumentloader-async>async</a></code> is
set to false, let <var title="">document</var> be
<dfn id=load-blocked>load-blocked</dfn>.</li>

<li><p>Remove all child nodes of <var title="">document</var>,
without firing any mutation events.</li> <!-- as of 2010-07-26,
only Opera fired mutation events here. -->
Expand Down Expand Up @@ -8811,8 +8820,12 @@ <h4 id=loading-xml-documents><span class=secno>3.1.6 </span>Loading XML document

</ol></li>

<li><p>If <code title=dom-XMLDocumentLoader-async><a href=#dom-xmldocumentloader-async>async</a></code> is
set to false, return <var title="">success</var>.</li>
<li><p>If <code title=dom-XMLDocumentLoader-async><a href=#dom-xmldocumentloader-async>async</a></code>
was set to false when this algorithm started, let <var title="">document</var> be no longer
<a href=#load-blocked>load-blocked</a>.</li>

<li><p>If <code title=dom-XMLDocumentLoader-async><a href=#dom-xmldocumentloader-async>async</a></code>
was set to false when this algorithm started, return <var title="">success</var>.</li>

</ol></div>

Expand Down
21 changes: 17 additions & 4 deletions index
Expand Up @@ -8666,13 +8666,22 @@ interface <dfn id=xmldocumentloader>XMLDocumentLoader</dfn> {
<p>The <dfn id=dom-xmldocumentloader-load title=dom-XMLDocumentLoader-load><code>load(<var title="">url</var>)</code></dfn> method must run the following
steps:</p>

<ol><li><p>Let <var title="">document</var> be the <code><a href=#document>Document</a></code>
object on which the method was invoked.</p>~</li>
<ol><li><p>If <code title=dom-XMLDocumentLoader-async><a href=#dom-xmldocumentloader-async>async</a></code> is
set to false and the <var title="">document</var> is
<a href=#load-blocked>load-blocked</a>, return false and abort these
steps.</li>

<li><p>Let <var title="">document</var> be the <code><a href=#document>Document</a></code>
object on which the method was invoked.</li>

<li><p>If the <a href=#origin>origin</a> of <var title="">url</var> is not
the same as the <a href=#origin>origin</a> of <var title="">document</var>, throw a <code><a href=#security_err>SECURITY_ERR</a></code>
exception.</li>

<li><p>If <code title=dom-XMLDocumentLoader-async><a href=#dom-xmldocumentloader-async>async</a></code> is
set to false, let <var title="">document</var> be
<dfn id=load-blocked>load-blocked</dfn>.</li>

<li><p>Remove all child nodes of <var title="">document</var>,
without firing any mutation events.</li> <!-- as of 2010-07-26,
only Opera fired mutation events here. -->
Expand Down Expand Up @@ -8735,8 +8744,12 @@ interface <dfn id=xmldocumentloader>XMLDocumentLoader</dfn> {

</ol></li>

<li><p>If <code title=dom-XMLDocumentLoader-async><a href=#dom-xmldocumentloader-async>async</a></code> is
set to false, return <var title="">success</var>.</li>
<li><p>If <code title=dom-XMLDocumentLoader-async><a href=#dom-xmldocumentloader-async>async</a></code>
was set to false when this algorithm started, let <var title="">document</var> be no longer
<a href=#load-blocked>load-blocked</a>.</li>

<li><p>If <code title=dom-XMLDocumentLoader-async><a href=#dom-xmldocumentloader-async>async</a></code>
was set to false when this algorithm started, return <var title="">success</var>.</li>

</ol></div>

Expand Down
21 changes: 18 additions & 3 deletions source
Expand Up @@ -8740,14 +8740,23 @@ interface <dfn>XMLDocumentLoader</dfn> {

<ol>

<li><p>If <code title="dom-XMLDocumentLoader-async">async</code> is
set to false and the <var title="">document</var> is
<span>load-blocked</span>, return false and abort these
steps.</p></li>

<li><p>Let <var title="">document</var> be the <code>Document</code>
object on which the method was invoked.</p>~</li>
object on which the method was invoked.</p></li>

<li><p>If the <span>origin</span> of <var title="">url</var> is not
the same as the <span>origin</span> of <var
title="">document</var>, throw a <code>SECURITY_ERR</code>
exception.</p></li>

<li><p>If <code title="dom-XMLDocumentLoader-async">async</code> is
set to false, let <var title="">document</var> be
<dfn>load-blocked</dfn>.</p></li>

<li><p>Remove all child nodes of <var title="">document</var>,
without firing any mutation events.</p></li> <!-- as of 2010-07-26,
only Opera fired mutation events here. -->
Expand Down Expand Up @@ -8825,8 +8834,14 @@ interface <dfn>XMLDocumentLoader</dfn> {

</li>

<li><p>If <code title="dom-XMLDocumentLoader-async">async</code> is
set to false, return <var title="">success</var>.</p></li>
<li><p>If <code title="dom-XMLDocumentLoader-async">async</code>
was set to false when this algorithm started, let <var
title="">document</var> be no longer
<span>load-blocked</span>.</p></li>

<li><p>If <code title="dom-XMLDocumentLoader-async">async</code>
was set to false when this algorithm started, return <var
title="">success</var>.</p></li>

</ol>

Expand Down

0 comments on commit e70e6f4

Please sign in to comment.