Skip to content

Commit

Permalink
Fix "report an error" for module scripts
Browse files Browse the repository at this point in the history
Change "report an error" to check that the argument script is a classic script before accessing its muted errors field, which is not defined for other kinds of scripts.

Also applies the change to HostPromiseRejectionTracker.

Fixes #7501.
  • Loading branch information
takikawa authored Jan 21, 2022
1 parent 602b2b7 commit c5db535
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -93262,9 +93262,10 @@ document.querySelector("button").addEventListener("click", bound);
multiple lines.</p>
</li>

<li><p>If <var>script</var>'s <span>muted errors</span> is true, then set <var>message</var> to
"<code data-x="">Script error.</code>", <var>urlString</var> to the empty string, <var>line</var>
and <var>col</var> to 0, and <var>errorValue</var> to null.</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, then set <var>message</var> to "<code data-x="">Script error.</code>",
<var>urlString</var> to the empty string, <var>line</var> and <var>col</var> to 0, and
<var>errorValue</var> to null.</p></li>

<li><p>Let <var>notHandled</var> be true.</p></li>

Expand Down Expand Up @@ -93472,7 +93473,8 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
<ol>
<li><p>Let <var>script</var> be the <span>running script</span>.</p></li>

<li><p>If <var>script</var>'s <span>muted errors</span> is true, terminate these steps.</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>

<li><p>Let <var>settings object</var> be <var>script</var>'s <span>settings object</span>.</p>
</li>
Expand Down Expand Up @@ -127440,6 +127442,7 @@ INSERT INTERFACES HERE
Asbj&oslash;rn Ulsberg,
Ashley Gullen,
Ashley Sheridan,
Asumu Takikawa,
Atsushi Takayama,
Attila Haraszti,
Aurelien Levy,
Expand Down

0 comments on commit c5db535

Please sign in to comment.