diff --git a/html/cross-origin-opener-policy/reporting/resources/dispatcher.js b/html/cross-origin-opener-policy/reporting/resources/dispatcher.js
index ade25ee15327a4..5a842d03e6e1ad 100644
--- a/html/cross-origin-opener-policy/reporting/resources/dispatcher.js
+++ b/html/cross-origin-opener-policy/reporting/resources/dispatcher.js
@@ -19,13 +19,13 @@ const send = function(uuid, message) {
const receive = async function(uuid, maybe_timeout) {
const timeout = maybe_timeout || Infinity;
- const retry_delay = 100;
- for(let i = 0; i * retry_delay < timeout; ++i) {
+ let start = performance.now();
+ while(performance.now() - start < timeout) {
let response = await fetch(dispatcher_url + `?uuid=${uuid}`);
let data = await response.text();
if (data != 'not ready')
return data;
- await new Promise(r => step_timeout(r, retry_delay));
+ await new Promise(r => setTimeout(r, 100)); // Save resources.
}
return "timeout";
}
diff --git a/html/cross-origin-opener-policy/reporting/resources/executor.html b/html/cross-origin-opener-policy/reporting/resources/executor.html
index e97e18aca4bd6f..9f38ebe2159219 100644
--- a/html/cross-origin-opener-policy/reporting/resources/executor.html
+++ b/html/cross-origin-opener-policy/reporting/resources/executor.html
@@ -1,4 +1,3 @@
-