Skip to content

Commit 36d771a

Browse files
authored
Simplify the definition of the "entry" concept
It turns out that the "entrance counter" concept was unnecessary. Whenever we run script, we increment it, and whenever we clean up after running script, we decrement it. So it is always nonzero. Thus we can simply look for whether it's a realm execution context. Fixes whatwg#2441.
1 parent d5f63d2 commit 36d771a

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

source

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -87622,9 +87622,6 @@ interface <dfn>NavigatorOnLine</dfn> {
8762287622

8762387623
<ol>
8762487624

87625-
<li><p>Increment <var>settings</var>'s <span>realm execution context</span>'s <span>entrance
87626-
counter</span> by one.</p></li>
87627-
8762887625
<li><p>Push <var>settings</var>'s <span>realm execution context</span> onto the <span>JavaScript
8762987626
execution context stack</span>; it is now the <span>running JavaScript execution
8763087627
context</span>.</p></li>
@@ -87642,9 +87639,6 @@ interface <dfn>NavigatorOnLine</dfn> {
8764287639
<li><p>Remove <var>settings</var>'s <span>realm execution context</span> from the
8764387640
<span>JavaScript execution context stack</span>.</p></li>
8764487641

87645-
<li><p>Decrement <var>settings</var>'s <span>realm execution context</span>'s <span>entrance
87646-
counter</span> by one.</p></li>
87647-
8764887642
<li><p>If the <span>JavaScript execution context stack</span> is now empty, <span>perform a
8764987643
microtask checkpoint</span>. (If this runs scripts, these algorithms will be invoked
8765087644
reentrantly.)</p></li>
@@ -87871,15 +87865,15 @@ interface <dfn>NavigatorOnLine</dfn> {
8787187865

8787287866
<h6>Entry</h6>
8787387867

87874-
<p>All <span data-x="realm execution context">realm execution contexts</span> must contain, as
87875-
part of their code evaluation state, an <dfn>entrance counter</dfn> value, which is initially
87876-
zero. In the process of <a href="#calling-scripts">calling scripts</a>, this value will be
87877-
incremented and decremented.</p>
87868+
<p>The process of <a href="#calling-scripts">calling scripts</a> will push or pop <span
87869+
data-x="realm execution context">realm execution contexts</span> onto the <span>JavaScript
87870+
execution context stack</span>, interspersed with other <span data-x="JavaScript execution
87871+
context">execution contexts</span>.</p>
8787887872

8787987873
<p>With this in hand, we define the <dfn>entry execution context</dfn> to be the most recently
87880-
pushed entry in the <span>JavaScript execution context stack</span> whose <span>entrance
87881-
counter</span> value is greater than zero. The <dfn data-x="concept-entry-realm">entry Realm</dfn>
87882-
is the <span>entry execution context</span>'s Realm component.</p>
87874+
pushed item in the <span>JavaScript execution context stack</span> that is a <span data-x="realm
87875+
execution context">realm execution context</span>. The <dfn data-x="concept-entry-realm">entry
87876+
Realm</dfn> is the <span>entry execution context</span>'s Realm component.</p>
8788387877

8788487878
<p>Then, the <dfn>entry settings object</dfn> is the <span
8788587879
data-x="concept-realm-settings-object">environment settings object</span> of the <span
@@ -120236,8 +120230,8 @@ INSERT INTERFACES HERE
120236120230
Jellybean Stonerfish,
120237120231
Jens Bannmann,
120238120232
Jens Fendler,
120239-
Jens Lindstr&ouml;m,
120240120233
Jens Oliver Meiert,
120234+
Jens Widell,
120241120235
Jer Noble,
120242120236
Jeremey Hustman,
120243120237
Jeremy Keith,

0 commit comments

Comments
 (0)