Commit 06c77160 authored by Rick Waldron's avatar Rick Waldron Committed by Commit Bot

Expose "$262.agent.monotonicNow()" for use in testing Atomic operation timeouts. Bug: v8:7705

R=binji@chromium.org, franzih@chromium.org

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ib6db8ec0b9980399e53e4b39f5c10150ca72f555
Reviewed-on: https://chromium-review.googlesource.com/1033426
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: 's avatarBen Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52897}
parent f79ed8dc
......@@ -129,6 +129,7 @@ Qiuyi Zhang <qiuyi.zqy@alibaba-inc.com>
Rafal Krypa <rafal@krypa.net>
Refael Ackermann <refack@gmail.com>
Rene Rebe <rene@exactcode.de>
Rick Waldron <waldron.rick@gmail.com>
Rob Wu <rob@robwu.nl>
Robert Mustacchi <rm@fingolfin.org>
Robert Nagy <robert.nagy@gmail.com>
......
......@@ -62,7 +62,11 @@ function workerScript(script) {
sleep(s) { Atomics.wait(i32a, ${SLEEP_LOC}, 0, s); },
leaving() {}
leaving() {},
monotonicNow() {
return performance.now();
}
}
};`;
}
......@@ -103,7 +107,11 @@ var agent = {
return pendingReports.shift() || null;
},
sleep(s) { Atomics.wait(i32a, SLEEP_LOC, 0, s); }
sleep(s) { Atomics.wait(i32a, SLEEP_LOC, 0, s); },
monotonicNow() {
return performance.now();
}
};
return agent;
......
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