My app had an error and was "terminated" by the default RP error handler. However, the worker thread was still running (in VS) and the wwahost.exe did not terminate.
The Worker has an error though. According to the W3C specs the onerror should be called if inside the Worker an exception is thrown.
Another thing is: calling self.close() inside the worker removes the Worker from the process, calling worker.terminate() from outside the worker does not remove it.