Skip to content

Commit

Permalink
Replace HTML's "report the exception" with "report an exception". (#758)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jeremyroman authored Sep 6, 2024
1 parent 287e9c6 commit 0575bf7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -7124,6 +7124,9 @@ To <dfn export>run WebDriver BiDi preload scripts</dfn> 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 <code>arguments</code>.

1. Let |deserialized arguments| be an empty list.
Expand All @@ -7141,21 +7144,21 @@ To <dfn export>run WebDriver BiDi preload scripts</dfn> given |environment setti

1. Let |function declaration| be |preload script|'s <code>function declaration</code>.

1. Let (|script|, |function body evaluation status|) be the result of
1. Let (<var ignore>script</var>, |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]].

1. If [=IsCallable=](|function object|) is <code>false</code>:

1. Let |error| be a new <a data-link-type="exception">TypeError</a> 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|.

Expand All @@ -7165,7 +7168,8 @@ To <dfn export>run WebDriver BiDi preload scripts</dfn> 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|.

</div>

Expand Down

0 comments on commit 0575bf7

Please sign in to comment.