From b37fd224b0381d4f5ab9f3a61b3302130c058d26 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 17 Nov 2020 19:19:55 +0530 Subject: [PATCH] continue bisecting --- www/common/cryptpad-common.js | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index cb312892b..2d7440087 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -2056,6 +2056,7 @@ define([ }; var userHash; + console.error('without this error statement Firefox on iOS throws a script error...'); Nthen(function (waitFor) { if (AppConfig.beforeLogin) { @@ -2108,7 +2109,6 @@ define([ // FIXME Backward compatibility if (sessionStorage.newPadFileData) { - /* common.fromFileData = JSON.parse(sessionStorage.newPadFileData); var _parsed1 = Hash.parsePadUrl(common.fromFileData.href); var _parsed2 = Hash.parsePadUrl(window.location.href); @@ -2116,7 +2116,6 @@ define([ if (_parsed1.type !== _parsed2.type) { delete common.fromFileData; } } delete sessionStorage.newPadFileData; - */ } if (sessionStorage.newPadPath) { @@ -2136,12 +2135,11 @@ define([ var postMsg, worker; var noWorker = AppConfig.disableWorkers || false; var noSharedWorker = false; - if (localStorage.CryptPad_noWorkers || true) { + if (localStorage.CryptPad_noWorkers) { noWorker = localStorage.CryptPad_noWorkers === '1'; - //console.error('WebWorker/SharedWorker state forced to ' + !noWorker); + console.error('WebWorker/SharedWorker state forced to ' + !noWorker); } Nthen(function (waitFor2) { - return; if (Worker) { var w = waitFor2(); try { @@ -2164,7 +2162,6 @@ define([ w(); } } - return; if (typeof(SharedWorker) !== "undefined") { try { new SharedWorker(''); @@ -2174,18 +2171,6 @@ define([ } } }).nThen(function (waitFor2) { - // Use the async store in the main thread if workers are not available - require(['/common/outer/noworker.js'], waitFor2(function (NoWorker) { - NoWorker.onMessage(function (data) { - msgEv.fire({data: data}); - }); - postMsg = function (d) { setTimeout(function () { NoWorker.query(d); }); }; - NoWorker.create(); - })); - return; - - - if (!noWorker && !noSharedWorker && typeof(SharedWorker) !== "undefined") { worker = new SharedWorker('/common/outer/sharedworker.js?' + urlArgs); worker.onerror = function (e) {