diff --git a/servo/etc/ci/performance/user-agent-js/01.perf-timing.js b/servo/etc/ci/performance/user-agent-js/01.perf-timing.js index 9aff2aa8a568..e20376031b5c 100644 --- a/servo/etc/ci/performance/user-agent-js/01.perf-timing.js +++ b/servo/etc/ci/performance/user-agent-js/01.perf-timing.js @@ -41,7 +41,9 @@ if (document.readyState === "complete") { printPerfTiming() window.close(); } else { - window.addEventListener('load', printPerfTiming); + window.addEventListener('load', function () { + window.setTimeout(printPerfTiming, 0); + }); var timeout = 5; window.setTimeout(function() { print("[PERF] Timeout after " + timeout + " min. Force stop");