From 0575bf7bedc1fb532d7bbdc0fd686780b30d6f29 Mon Sep 17 00:00:00 2001 From: Jeremy Roman Date: Fri, 6 Sep 2024 06:24:13 -0400 Subject: [PATCH] Replace HTML's "report the exception" with "report an exception". (#758) The former is deprecated. Currently, the environment settings object's realm's global is used (which is consistent with what the spec would previously have said before). It's possible this ought to use the sandbox's realm, but that realm is not currently used for the function evaluation itself right now -- and that's the function whence the error comes. This is part of whatwg/html#10516. --- index.bs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/index.bs b/index.bs index 5f967006..74918963 100644 --- a/index.bs +++ b/index.bs @@ -7124,6 +7124,9 @@ To run WebDriver BiDi preload scripts given |environment setti |navigable|. Otherwise let |realm| be |environment settings|' [=realm execution context=]'s Realm component. + 1. Let |exception reporting global| be be |environment settings|' + [=realm execution context=]'s Realm component's [=realm/global object=]. + 1. Let |arguments| be |preload script|'s arguments. 1. Let |deserialized arguments| be an empty list. @@ -7141,13 +7144,13 @@ To run WebDriver BiDi preload scripts given |environment setti 1. Let |function declaration| be |preload script|'s function declaration. - 1. Let (|script|, |function body evaluation status|) be the result of + 1. Let (script, |function body evaluation status|) be the result of [=evaluate function body=] with |function declaration|, |environment settings|, |base URL|, and |options|. 1. If |function body evaluation status| is an [=abrupt completion=], then - [=report the exception=] given by |function body evaluation status|.\[[Value]] - for |script|. + [=report an exception=] given by |function body evaluation status|.\[[Value]] + for |exception reporting global|. 1. Let |function object| be |function body evaluation status|.\[[Value]]. @@ -7155,7 +7158,7 @@ To run WebDriver BiDi preload scripts given |environment setti 1. Let |error| be a new TypeError object in |realm|. - 1. [=Report the exception=] |error|. + 1. [=Report an exception=] |error| for |exception reporting global|. 1. [=Prepare to run script=] with |environment settings|. @@ -7165,7 +7168,8 @@ To run WebDriver BiDi preload scripts given |environment setti 1. [=Clean up after running script=] with |environment settings|. 1. If |evaluation status| is an [=abrupt completion=], then - [=report the exception=] given by |evaluation status|.\[[Value]] for |script|. + [=report an exception=] given by |evaluation status|.\[[Value]] for + |exception reporting global|.