summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorhackademix2018-09-05 15:51:43 +0200
committerhackademix2018-09-05 15:51:43 +0200
commit97d4c22669087a2fcfae8861f94c946b898920f2 (patch)
treed7b56c72cd9b017165b8272515ad627ed244b0fb /src/lib
parentec0d7b4aff0a383a7c611e9fd18e5813f7fbfad6 (diff)
downloadnoscript-97d4c22669087a2fcfae8861f94c946b898920f2.tar.gz
noscript-97d4c22669087a2fcfae8861f94c946b898920f2.tar.xz
noscript-97d4c22669087a2fcfae8861f94c946b898920f2.zip
Work-around for a potential race condition in message handling on extension updates.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Messages.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Messages.js b/src/lib/Messages.js
index 50639ef..b8977cf 100644
--- a/src/lib/Messages.js
+++ b/src/lib/Messages.js
@@ -13,13 +13,13 @@
}
if (answers.length) {
return await (
- answers.length === 1 ? answers.pop(): Promise.all(answers)
+ answers.length === 1 ? answers.pop(): Promise.all(answers)
);
}
- console.log("Answering %s", _messageName);
+ console.debug("Warning: no handler for message %s", _messageName);
return undefined;
};
-
+
var Messages = {
addHandler(handler) {
let originalSize = handlers.size;