Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HostPromiseRejectionHandler when running script is null #8043

Merged
merged 1 commit into from
Dec 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -94805,33 +94805,35 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
<li><p>Let <var>script</var> be the <span>running script</span>.</p></li>

<li><p>If <var>script</var> is a <span>classic script</span> and <var>script</var>'s <span>muted
errors</span> is true, terminate these steps.</p></li>
errors</span> is true, then return.</p></li>

<li><p>Let <var>settings object</var> be <var>script</var>'s <span>settings object</span>.</p>
</li>
<li><p>Let <var>settings object</var> be the <span>current settings object</span>.</p></li>

<li><p>If <var>script</var> is not null, then set <var>settings object</var> to
<var>script</var>'s <span>settings object</span>.</p></li>

<li>
<p>If <var>operation</var> is <code data-x="">"reject"</code>,
<p>If <var>operation</var> is "<code data-x="">reject</code>", then:</p>

<ol>
<li><p>Add <var>promise</var> to <var>settings object</var>'s <span>about-to-be-notified
rejected promises list</span>.</p></li>
<li><p><span data-x="list append">Append</span> <var>promise</var> to <var>settings
object</var>'s <span>about-to-be-notified rejected promises list</span>.</p></li>
</ol>
</li>

<li>
<p>If <var>operation</var> is <code data-x="">"handle"</code>,
<p>If <var>operation</var> is "<code data-x="">handle</code>", then:</p>

<ol>
<li><p>If <var>settings object</var>'s <span>about-to-be-notified rejected promises
list</span> contains <var>promise</var>, then remove <var>promise</var> from that list and
return.</p></li>
list</span> <span data-x="list contains">contains</span> <var>promise</var>, then <span
data-x="list remove">remove</span> <var>promise</var> from that list and return.</p></li>

<li><p>If <var>settings object</var>'s <span>outstanding rejected promises weak set</span>
does not contain <var>promise</var>, then return.</p></li>
does not <span data-x="list contains">contain</span> <var>promise</var>, then return.</p></li>

<li><p>Remove <var>promise</var> from <var>settings object</var>'s <span>outstanding rejected
promises weak set</span>.</p></li>
<li><p><span data-x="list remove">Remove</span> <var>promise</var> from <var>settings
object</var>'s <span>outstanding rejected promises weak set</span>.</p></li>

<li><p>Let <var>global</var> be <var>settings object</var>'s <span
data-x="concept-settings-object-global">global object</span>.</p></li>
Expand All @@ -94842,7 +94844,7 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
<code>PromiseRejectionEvent</code>, with the <code
data-x="dom-PromiseRejectionEvent-promise">promise</code> attribute initialized to
<var>promise</var>, and the <code data-x="dom-PromiseRejectionEvent-reason">reason</code>
attribute initialized to the value of <var>promise</var>'s [[PromiseResult]] internal slot.</p></li>
attribute initialized to <var>promise</var>.[[PromiseResult]].</p></li>
</ol>
</li>
</ol>
Expand Down