From d5d0eabdfda2f1945f643606c9467fbbca87f259 Mon Sep 17 00:00:00 2001 From: Daniel Gasienica Date: Tue, 27 Mar 2018 12:20:07 -0400 Subject: [PATCH] Remove usage of `storage` module --- js/background.js | 2 +- js/modules/messages_data_migrator.js | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/js/background.js b/js/background.js index dce1de980..a81311790 100644 --- a/js/background.js +++ b/js/background.js @@ -89,7 +89,7 @@ await Migrations0DatabaseWithAttachmentData.run({ Backbone }); console.log('Migrate attachments to disk'); - await MessageDataMigrator.processAll({ Backbone, storage, upgradeMessageSchema }); + await MessageDataMigrator.processAll({ Backbone, upgradeMessageSchema }); console.log('Migrate database without attachments'); await Migrations1DatabaseWithoutAttachmentData.run({ diff --git a/js/modules/messages_data_migrator.js b/js/modules/messages_data_migrator.js index 9587d0300..165905bc2 100644 --- a/js/modules/messages_data_migrator.js +++ b/js/modules/messages_data_migrator.js @@ -77,19 +77,11 @@ exports.processNext = async ({ }; }; -exports.processAll = async ({ - Backbone, - storage, - upgradeMessageSchema, -} = {}) => { +exports.processAll = async ({ Backbone, upgradeMessageSchema } = {}) => { if (!isObject(Backbone)) { throw new TypeError('"Backbone" is required'); } - if (!isObject(storage)) { - throw new TypeError('"storage" is required'); - } - if (!isFunction(upgradeMessageSchema)) { throw new TypeError('"upgradeMessageSchema" is required'); }