web-worker-chrome-firefox

the web worker is very slow on firefox. For this code, on my computer it' roughly 4x slower on Firefox compared to Chrome

Trying to simplify my code for publihing on stackoverflow I have found a solution... let's say it's more a hack !

Adding anywhere in the worker's message handler a blank try {} catch {} block the performance of Firefox is equivalent (and sometimes better :) than Chrome.

Explanation ?