<script>
  async function foo() {
    let worker = new Worker('data:,');
    GCController.collect();
    if (window.caches)
      await caches.has('a');
    new RTCRtpScriptTransform(worker, {});
    worker.terminate();
  }

  onload = () => {
    if (window.testRunner)
      testRunner.dumpAsText();
    console.log('This test PASS if it does not crash.')
    let s0 = document.createElement('script');
    s0.src = `data:,for (var i = 10; i; i--)(${foo.toString()})();`;
    document.head.appendChild(s0);
  };
</script>
