Commit d433911c authored by Ben Smith's avatar Ben Smith Committed by Commit Bot

Make test262 agent more strict in broadcast/report

BUG=v8:6231

Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I326ace8ee27e5347d26bae11b8061f4fe524db53
Reviewed-on: https://chromium-review.googlesource.com/562744Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46488}
parent 47dc8702
......@@ -56,7 +56,7 @@ function workerScript(script) {
},
report(msg) {
postMessage(msg);
postMessage(String(msg));
Atomics.add(i32a, ${WORKER_REPORT_LOC} + index, 1);
},
......@@ -79,6 +79,10 @@ var agent = {
},
broadcast(sab, id) {
if (!(sab instanceof SharedArrayBuffer)) {
throw new TypeError('sab must be a SharedArrayBuffer.');
}
Atomics.store(i32a, BROADCAST_LOC, 0);
for (var w of workers) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment