Skip to content

Commit 0515d54

Browse files
committed
Make promises unsettled when entries are disabled
1 parent 4c4aef6 commit 0515d54

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

source

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -99691,16 +99691,18 @@ interface <dfn interface>NavigationHistoryEntry</dfn> : <span>EventTarget</span>
9969199691
API method tracker</span>-or-null <var>apiMethodTracker</var>:</p>
9969299692

9969399693
<ol>
99694-
<li><p>If <var>apiMethodTracker</var> is null, or if its <span
99695-
data-x="navigation-api-method-tracker-promoted">promoted</span> is false, then return an <span
99696-
data-x="navigation-api-early-error-result">early error result</span> for an
99697-
<span>"<code>AbortError</code>"</span> <code>DOMException</code>.</p></li>
99698-
99699-
<li><p>Return a <code>NavigationResult</code> dictionary instance given by «[ "<code
99694+
<li><p>If <var>apiMethodTracker</var> has been <span
99695+
data-x="navigation-api-method-tracker-promoted">promoted</span>, or if
99696+
<var>apiMethodTracker</var>'s <span data-x="navigation-api-method-tracker-navigation">navigation
99697+
object</span> <span>has entries and events disabled</span>, then return a
99698+
<code>NavigationResult</code> dictionary instance given by «[ "<code
9970099699
data-x="dom-NavigationResult-committed">committed</code>" → <var>apiMethodTracker</var>'s <span
9970199700
data-x="navigation-api-method-tracker-committed">committed promise</span>, "<code
9970299701
data-x="dom-NavigationResult-finished">finished</code>" → <var>apiMethodTracker</var>'s <span
9970399702
data-x="navigation-api-method-tracker-finished">finished promise</span> ]».</p></li>
99703+
99704+
<li><p>Otherwise, return an <span data-x="navigation-api-early-error-result">early error
99705+
result</span> for an <span>"<code>AbortError</code>"</span> <code>DOMException</code>.</p></li>
9970499706
</ol>
9970599707

9970699708
</div>
@@ -99883,19 +99885,6 @@ const p2 = navigation.navigate(url2).finished;</code></pre>
9988399885
</div>
9988499886
</li>
9988599887

99886-
<li id="dont-always-set-upcoming-non-traverse-api-method-tracker">
99887-
<p>If <var>navigation</var> <span>has entries and events disabled</span>, then return null.</p>
99888-
99889-
<p class="note">If <var>navigation</var> <span>has entries and events disabled</span>, then
99890-
<var>committedPromise</var> and <var>finishedPromise</var> will never fulfill (since we never
99891-
create a <code>NavigationHistoryEntry</code> object for such <code>Document</code>s, and so we
99892-
have nothing to resolve them with); there is no <code>NavigationHistoryEntry</code> to apply
99893-
<var>serializedState</var> to; and there is no <code data-x="event-navigate">navigate</code>
99894-
event to include <var>info</var> with. So, we don't need to track this API method call after
99895-
all.</p>
99896-
</li>
99897-
99898-
9989999888
<li>
9990099889
<p>Return a new <span>navigation API method tracker</span> with:</p>
9990199890

@@ -101249,14 +101238,38 @@ interface <dfn interface>NavigationDestination</dfn> {
101249101238
state</span>-or-null <dfn
101250101239
data-x="fire-navigate-prr-classicHistoryAPIState"><var>classicHistoryAPIState</var></dfn> (default
101251101240
null), and an optional <span>navigation API method tracker</span>-or-null <dfn
101252-
data-x="fire-navigate-prr-api-method-tracker"><var>apiMethodTracker</var></dfn>:</p>
101241+
data-x="fire-navigate-prr-api-method-tracker"><var>apiMethodTrackerForNavigateOrReload</var></dfn>:</p>
101253101242

101254101243
<ol>
101244+
<li>
101245+
<p>If <var>navigation</var> <span>has entries and events disabled</span>, then set
101246+
<var>apiMethodTrackerForNavigateOrReload</var> to null.</p>
101247+
101248+
<p class="note">If <var>navigation</var> <span>has entries and events disabled</span>, then
101249+
<code data-x="dom-Navigation-navigate">navigate()</code> and <code
101250+
data-x="dom-Navigation-reload">reload()</code> calls return promises that will never fulfill
101251+
(since we never create a <code>NavigationHistoryEntry</code> object for such
101252+
<code>Document</code>s, and so we have nothing to resolve them with); there is no
101253+
<code>NavigationHistoryEntry</code> to apply <var>serializedState</var> to; and there is no
101254+
<code data-x="event-navigate">navigate</code> event to include <var>info</var> with. So, we
101255+
don't need to track this API method call after all.</p>
101256+
</li>
101257+
101255101258
<li><p><span>Inform the navigation API about aborting navigation</span> in
101256101259
<var>navigation</var>'s <span>relevant global object</span>'s <span
101257101260
data-x="concept-document-window">associated <code>Document</code></span>'s <span>node
101258101261
navigable</span>.</p></li>
101259101262

101263+
<li>
101264+
<p>If <var>apiMethodTrackerForNavigateOrReload</var> is non-null, and <var>navigation</var>'s
101265+
<span>relevant global object</span>'s <span data-x="concept-document-window">associated
101266+
<code>Document</code></span> is not <span>fully active</span>, then return false.</p>
101267+
101268+
<p class="note">This would occur if the document became inactive as a result of aborting the
101269+
ongoing navigation, e.g., if a <code data-x="event-navigateerror">navigateerror</code> handler
101270+
synchronously removed its <span>navigable</span>.</p>
101271+
</li>
101272+
101260101273
<li><p>Let <var>event</var> be the result of <span>creating an event</span> given
101261101274
<code>NavigateEvent</code>, in <var>navigation</var>'s <span
101262101275
data-x="concept-relevant-realm">relevant realm</span>.</p></li>
@@ -101355,21 +101368,7 @@ interface <dfn interface>NavigationDestination</dfn> {
101355101368
<li><p><span>Assert</span>: <var>navigation</var>'s <span>upcoming traverse API method
101356101369
trackers</span> <span data-x="list is empty">is empty</span>.</p></li>
101357101370

101358-
<li>
101359-
<p>If <var>apiMethodTracker</var> is non-null, then:</p>
101360-
101361-
<ol>
101362-
<li><p>Assert: <var>navigation</var>'s <span>relevant global object</span>'s <span
101363-
data-x="concept-document-window">associated <code>Document</code></span> is not <span>fully
101364-
active</span>.</p></li>
101365-
101366-
<li><p>Return false.</p></li>
101367-
</ol>
101368-
101369-
<p class="note">This would occur if the document became inactive as a result of aborting the
101370-
ongoing navigation, e.g., if a <code data-x="event-navigateerror">navigateerror</code> handler
101371-
removed its <span>navigable</span>.</p>
101372-
</li>
101371+
<li><p><span>Assert</span>: <var>apiMethodTracker</var> is null.</p></li>
101373101372

101374101373
<li><p>Return true.</p></li>
101375101374
</ol>
@@ -101419,7 +101418,8 @@ interface <dfn interface>NavigationDestination</dfn> {
101419101418
</li>
101420101419

101421101420
<li><p>If <var>apiMethodTracker</var> is not null, then set <var>apiMethodTracker</var>'s <span
101422-
data-x="navigation-api-method-tracker-promoted">promoted</span> to true.</p></li>
101421+
data-x="navigation-api-method-tracker-status">status</span> to "<code
101422+
data-x="">ongoing</code>".</p></li>
101423101423

101424101424
<li><p>Set <var>navigation</var>'s <span>ongoing API method tracker</span> to
101425101425
<var>apiMethodTracker</var>.</p></li>

0 commit comments

Comments
 (0)