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: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Ben Smith <binji@chromium.org> Cr-Commit-Position: refs/heads/master@{#52897}
This commit is contained in:
parent
f79ed8dc18
commit
06c77160b5
1
AUTHORS
1
AUTHORS
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user