tc39 / ecma262

Status, process, and documents for ECMA-262
https://tc39.es/ecma262/
Other
14.85k stars 1.27k forks source link

Typo in step 7 of the SuspendThisAgent abstract operation #3328

Open declval opened 1 month ago

declval commented 1 month ago

At the end of step 7 of the SuspendThisAgent abstract operation the second argument to NotifyWaiter should be a waiterRecord (a Waiter Record) and not thisAgent (an agent signifier) according to the definition of NotifyWaiter.

The last sentence of step 7 reads:

The surrounding agent can only wake from suspension due to a timeout or due to another agent calling NotifyWaiter with arguments WL and thisAgent (i.e. via a call to Atomics.notify).

The first sentence of NotifyWaiter says:

The abstract operation NotifyWaiter takes arguments WL (a WaiterList Record) and waiterRecord (a Waiter Record) and returns unused.

jmdyck commented 1 month ago

Looks like this happened in PR #3049.