From 6266050a67ec9deedf36c99177d5a29151a60a35 Mon Sep 17 00:00:00 2001 From: lilia Date: Sun, 1 May 2016 15:51:07 -0700 Subject: [PATCH] Remove unused jobqueue // FREEBIE --- js/libtextsecure.js | 17 ----------------- libtextsecure/protocol_wrapper.js | 17 ----------------- 2 files changed, 34 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index bc1e12e3..f8fb20b5 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -35474,23 +35474,6 @@ Internal.SessionLock.queueJobForNumber = function queueJobForNumber(number, runJ textsecure.storage.protocol = new SignalProtocolStore(); var protocolInstance = libsignal.protocol(textsecure.storage.protocol); - /* - * jobQueue manages multiple queues indexed by device to serialize - * session io ops on the database. - */ - var jobQueue = {}; - function queueJobForNumber(number, runJob) { - var runPrevious = jobQueue[number] || Promise.resolve(); - var runCurrent = jobQueue[number] = runPrevious.then(runJob, runJob); - runCurrent.then(function() { - if (jobQueue[number] === runCurrent) { - delete jobQueue[number]; - } - }); - - return runCurrent; - } - window.textsecure = window.textsecure || {}; window.textsecure.protocol_wrapper = { startWorker: function() { diff --git a/libtextsecure/protocol_wrapper.js b/libtextsecure/protocol_wrapper.js index b2b07a58..834a806c 100644 --- a/libtextsecure/protocol_wrapper.js +++ b/libtextsecure/protocol_wrapper.js @@ -9,23 +9,6 @@ textsecure.storage.protocol = new SignalProtocolStore(); var protocolInstance = libsignal.protocol(textsecure.storage.protocol); - /* - * jobQueue manages multiple queues indexed by device to serialize - * session io ops on the database. - */ - var jobQueue = {}; - function queueJobForNumber(number, runJob) { - var runPrevious = jobQueue[number] || Promise.resolve(); - var runCurrent = jobQueue[number] = runPrevious.then(runJob, runJob); - runCurrent.then(function() { - if (jobQueue[number] === runCurrent) { - delete jobQueue[number]; - } - }); - - return runCurrent; - } - window.textsecure = window.textsecure || {}; window.textsecure.protocol_wrapper = { startWorker: function() {