Worker js files that throw an exception at runtime don't invoke the onerror method (or throw an exception). Excpected onerror to be invoked when message posted to worker that causing runtime exception within the worker.
We're currently implementing an older version of the spec, where onerror was only called for network errors - need to update to current version.
*** Bug 26049 has been marked as a duplicate of this bug. ***
This should have been fixed.