Commit Graph

6 Commits

Author SHA1 Message Date
Rick Waldron e4883091b9 Introduce $262.agent.safeBroadcast and migrate Atomics tests.
Migrating all tests to this API is necessary to prevent tests from hanging indefinitely when a SAB is sent to a worker but the code in the worker attempts to create a non-sharable TypedArray (something that is not Int32Array or BigInt64Array). When that scenario occurs, an exception is thrown and the agent worker can no longer communicate with any other threads that control the SAB. If the main thread happens to be spinning in the $262.agent.waitUntil() while loop, it will never meet its termination condition and the test will hang indefinitely.

Because we've defined $262.agent.broadcast(SAB) in https://github.com/tc39/test262/blob/master/INTERPRETING.md, there are host implementations that assume compatibility, which must be maintained.
2018-11-20 15:17:47 -05:00
Leo Balter 6335c39ade fixes after rebase 2018-07-24 15:03:54 -04:00
Leo Balter 4911c6e77a Last renamings in the Atomics/wake folder 2018-07-24 15:03:54 -04:00
Leo Balter 6533378823 Atomics.wake to Atomics.notify 2018-07-24 15:03:54 -04:00
Leo Balter 003388e36e Replace esid 2018-07-24 15:03:54 -04:00
Leo Balter cdfc67cd9d Move Atomics/wake to Atomics/notify 2018-07-24 15:03:54 -04:00