From be21156542c91fafde733c02b01b9b523d86fb2e Mon Sep 17 00:00:00 2001 From: Rick Waldron <waldron.rick@gmail.com> Date: Wed, 27 Jun 2018 10:30:46 -0400 Subject: [PATCH] Atomics: simplify harness/atomicsHelper.js: waitUntil --- harness/atomicsHelper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/harness/atomicsHelper.js b/harness/atomicsHelper.js index fc8d63bfc6..df5141743c 100644 --- a/harness/atomicsHelper.js +++ b/harness/atomicsHelper.js @@ -36,10 +36,10 @@ function getReport() { * @param {Number} expected The number of agents that are expected to report as active. */ function waitUntil(i32a, index, expected) { - while (Atomics.load(i32a, index) !== expected) { + let agents = 0; + while ((agents = Atomics.load(i32a, index)) !== expected) { /* nothing */ } - const agents = Atomics.load(i32a, index); assert.sameValue(agents, expected, `'agents' equals the value of 'expected' (${expected})`); } -- GitLab