Check that the MessageHandler isn't already terminated in the onFailure handler in src/core/worker.js (issue 8584)

All other code-paths already checks that the `MessageHandler` isn't terminated, but apparently `onFailure` was missing that check (compare e.g. with the `onSuccess` function).
From what I can tell, this is only an issue if workers are *disabled*, hence why I didn't bother adding a unit-test.

Fixes 8584.
This commit is contained in:
Jonas Jenwald 2017-06-29 13:59:38 +02:00
parent 80c33253ed
commit de0e7a9a68

View File

@ -654,6 +654,8 @@ var WorkerMessageHandler = {
}
function onFailure(e) {
ensureNotTerminated();
if (e instanceof PasswordException) {
var task = new WorkerTask('PasswordException: response ' + e.code);
startWorkerTask(task);