This appears to be due to more and more workers being created (once per call) without getting freed:
It seems explicitly calling .terminate() on a worker (or close() from inside it) is enough to tell Chrome it should free it. I'll submit a PR for this later today.
(I'm not sure whether this constitutes a Chromium bug or not. Firefox cleans up the workers and doesn't crash, but I'm unclear on whether this is required by the spec in the absence of close()/.terminate().)
Hello! Running a script involving regex such as
on https://neil.fraser.name/software/JS-Interpreter/ (or any instance with the default regex mode) crashes the tab in Chromium-based browsers.
This appears to be due to more and more workers being created (once per call) without getting freed:
It seems explicitly calling
.terminate()
on a worker (orclose()
from inside it) is enough to tell Chrome it should free it. I'll submit a PR for this later today.(I'm not sure whether this constitutes a Chromium bug or not. Firefox cleans up the workers and doesn't crash, but I'm unclear on whether this is required by the spec in the absence of
close()
/.terminate()
.)