Skip to content

Commit

Permalink
Fix the lack of timeout on ScriptExecution.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks Orlovich committed Nov 25, 2024
1 parent fd5dd85 commit 0d71e23
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5761,6 +5761,11 @@ of the following global objects:

1. Let |evaluationStatus| be the result of [$ScriptEvaluation$](result).

In |timeout| milliseconds, if the invocation of [$ScriptEvaluation$] has not completed,
[=immediately=] interrupt the execution, set |finalCompletion| to a new
[=ECMAScript/throw completion=] given null, set |timedOut| to true, and jump to the step
labeled <i><a href="#evaluate-script-return">return</a></i>.

1. If |evaluationStatus| is an [=ECMAScript/abrupt completion=], jump to the step labeled <i>
<a href="#evaluate-script-return">return</a></i>.

Expand All @@ -5771,9 +5776,9 @@ of the following global objects:
1. Set |finalCompletion| be [=ECMAScript/Completion Record|Completion=]([$Call$](F, `undefined`,
|arguments|)).

In |timeout| milliseconds, if the invocation of [$Call$] has not completed,
[=immediately=] interrupt the execution, set |finalCompletion| to a new
[=ECMAScript/throw completion=] given null, and set |timedOut| to true.
In |timeout| milliseconds less the execution time of [$ScriptEvaluation$], if the invocation
of [$Call$] has not completed, [=immediately=] interrupt the execution, set |finalCompletion|
to a new [=ECMAScript/throw completion=] given null, and set |timedOut| to true.

1. <i id=evaluate-script-return>Return</i>: at this point |finalCompletion| will be set to a
[=ECMAScript/Completion Record=].
Expand Down

0 comments on commit 0d71e23

Please sign in to comment.