From de0e7a9a68a015a8e9e85cb7ae1b2a20f35e468b Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 29 Jun 2017 13:59:38 +0200 Subject: [PATCH] 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. --- src/core/worker.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/worker.js b/src/core/worker.js index 770ba111bfbe6..f3dcecdd6f24f 100644 --- a/src/core/worker.js +++ b/src/core/worker.js @@ -654,6 +654,8 @@ var WorkerMessageHandler = { } function onFailure(e) { + ensureNotTerminated(); + if (e instanceof PasswordException) { var task = new WorkerTask('PasswordException: response ' + e.code); startWorkerTask(task);