From a1c4754375c5fb2efc00cc86d948d3ce74cc2f74 Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Wed, 19 Jan 2022 15:28:50 -0800 Subject: [PATCH] Fix access of muted errors flag in "report an error" Changes "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. --- source | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source b/source index 3fca957a551..d96d08d612e 100644 --- a/source +++ b/source @@ -93240,9 +93240,10 @@ document.querySelector("button").addEventListener("click", bound); multiple lines.

-
  • If script's muted errors is true, then set message to - "Script error.", urlString to the empty string, line - and col to 0, and errorValue to null.

  • +
  • If script is a classic script and script's muted + errors is true, then set message to "Script error.", + urlString to the empty string, line and col to 0, and + errorValue to null.

  • Let notHandled be true.

  • @@ -93450,7 +93451,8 @@ dictionary PromiseRejectionEventInit : EventInit
  • Let script be the running script.

  • -
  • If script's muted errors is true, terminate these steps.

  • +
  • If script is a classic script and script's muted + errors is true, terminate these steps.

  • Let settings object be script's settings object.