aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Brunschwig <[email protected]>2021-12-29 16:00:09 +0100
committerPatrick Brunschwig <[email protected]>2021-12-29 16:00:09 +0100
commit2eaeaee8b93637a452d2f5d28396fc809be02e8a (patch)
tree3e1b1714ce051e047d1e5080900a3bfcc0a640d3
parent7a2fabb849bb7c9872d8509da8ac54b6718fae2f (diff)
downloadenigmail-2eaeaee8b93637a452d2f5d28396fc809be02e8a.tar.gz
enigmail-2eaeaee8b93637a452d2f5d28396fc809be02e8a.tar.bz2
enigmail-2eaeaee8b93637a452d2f5d28396fc809be02e8a.zip
removed limitation to 1 transaction
-rw-r--r--package/cryptoAPI/pgpjs-crypto-worker.js32
1 files changed, 0 insertions, 32 deletions
diff --git a/package/cryptoAPI/pgpjs-crypto-worker.js b/package/cryptoAPI/pgpjs-crypto-worker.js
index b11ffbc7..b06d19c6 100644
--- a/package/cryptoAPI/pgpjs-crypto-worker.js
+++ b/package/cryptoAPI/pgpjs-crypto-worker.js
@@ -707,35 +707,6 @@ function getDateTime(dateNum, withDate, withTime) {
}
}
-const gTrx = [];
-
-function startOpenpgpTrx() {
- let promiseObj = {};
-
- return new Promise((resolve, reject) => {
- promiseObj.resolve = resolve;
- promiseObj.reject = reject;
- gTrx.push(promiseObj);
-
- if (gTrx.length === 1) {
- DEBUG_LOG("====> start process directly");
- resolve();
- }
- });
-}
-
-function endOpenpgpTrx() {
- if (gTrx.length > 0) {
- DEBUG_LOG("<==== end process");
- gTrx.splice(0, 1); // remove 1st element
- }
-
- if (gTrx.length > 0) {
- DEBUG_LOG("====> start process queued");
- gTrx[0].resolve();
- }
-}
-
/*************************************************************************
*
* Implementation of Worker
@@ -818,9 +789,7 @@ onmessage = async function(e) {
}
try {
- await startOpenpgpTrx();
let workerResult = await workerBody[method](args);
- endOpenpgpTrx();
DEBUG_LOG('Posting message back to main script');
postMessage({
trxId: e.data.trxId,
@@ -828,7 +797,6 @@ onmessage = async function(e) {
});
}
catch (ex) {
- endOpenpgpTrx();
postMessage({
trxId: e.data.trxId,
error: `${ex.toString()}\n${ex.stack}`