Skip to content

Commit

Permalink
Use entrance counter instead of flag
Browse files Browse the repository at this point in the history
Per discussions in #473 (comment); this is alternative (A)
  • Loading branch information
domenic committed Apr 28, 2016
1 parent 3da959a commit b24ce6d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -87435,8 +87435,8 @@ interface <dfn>NavigatorOnLine</dfn> {

<ol>

<li><p>Set <var>settings</var>'s <span>realm execution context</span>'s <span>is candidate entry
execution context</span> flag.</p></li>
<li><p>Increment <var>settings</var>'s <span>realm execution context</span>'s <span>entrance
counter</span> by one.</p></li>

<li><p>Push <var>settings</var>'s <span>realm execution context</span> onto the <span>JavaScript
execution context stack</span>; it is now the <span>running JavaScript execution
Expand All @@ -87453,8 +87453,8 @@ interface <dfn>NavigatorOnLine</dfn> {
<li><p>Assert: <var>settings</var>'s <span>realm execution context</span> is the <span>running
JavaScript execution context</span>.</p></li>

<li><p>Unset <var>settings</var>'s <span>realm execution context</span>'s <span>is candidate
entry execution context</span> flag.</p></li>
<li><p>Decrement <var>settings</var>'s <span>realm execution context</span>'s <span>entrance
counter</span> by one.</p></li>

<li><p>Remove <var>settings</var>'s <span>realm execution context</span> from the
<span>JavaScript execution context stack</span>.</p></li>
Expand Down Expand Up @@ -87486,7 +87486,7 @@ interface <dfn>NavigatorOnLine</dfn> {
perform each of the jobs in the <span>global script clean-up jobs list</span> and then empty the
list.</p>

<h5>Realms, settings objects, and global objects</h5>
<h5 id="realms-settings-objects-global-objects">Realms, settings objects, and global objects</h5>

<p>A <dfn>global object</dfn> is a JavaScript object that is the [[GlobalObject]] field of a
<span>JavaScript realm</span>.</p>
Expand Down Expand Up @@ -87692,15 +87692,15 @@ interface <dfn>NavigatorOnLine</dfn> {

<h6>Entry</h6>

<p>All <span data-x="JavaScript execution context">JavaScript execution contexts</span> must
contain, as part of their code evaluation state, an <dfn>is candidate entry execution
context</dfn> flag, which is initially unset. In the process of <a href="#calling-scripts">calling
scripts</a>, this flag will be toggled.</p>
<p>All <span data-x="realm execution context">realm execution contexts</span> must contain, as
part of their code evaluation state, an <dfn>entrance counter</dfn> value, which is initially
zero. In the process of <a href="#calling-scripts">calling scripts</a>, this value will be
incremented and decremented.</p>

<p>With this in hand, we define the <dfn>entry execution context</dfn> to be the most recently
pushed entry in the <span>JavaScript execution context stack</span> whose <span>is candidate entry
execution context</span> flag is set to true. The <dfn data-x="concept-entry-realm">entry
Realm</dfn> is the <span>entry execution context</span>'s Realm component.</p>
pushed entry in the <span>JavaScript execution context stack</span> whose <span>entrance
counter</span> value is greater than zero. The <dfn data-x="concept-entry-realm">entry Realm</dfn>
is the <span>entry execution context</span>'s Realm component.</p>

<p>Then, the <dfn>entry settings object</dfn> is the <span
data-x="concept-realm-settings-object">environment settings object</span> of the <span
Expand Down

0 comments on commit b24ce6d

Please sign in to comment.