chromium/third_party/blink/web_tests/external/wpt/workers/semantics/reporting-errors/004.js

var i = 0;
onconnect = function (e) {
  i++;
  setTimeout(function() { e.ports[0].postMessage(i); }, 250);
  y(); // will "report the error"
}