From 957297a7cb3f13d2a5576a59ea01029eeab84b89 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Tue, 29 Mar 2016 12:38:42 +0200 Subject: [PATCH 1/2] Always disable web worker for PDF.js and no longer rely on PDF.js catching the execption when the worker cannot be started, fixing Firefox 45+. --- static/js/sandboxes/pdf.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/static/js/sandboxes/pdf.js b/static/js/sandboxes/pdf.js index d38f45cd..f427c3a7 100644 --- a/static/js/sandboxes/pdf.js +++ b/static/js/sandboxes/pdf.js @@ -67,11 +67,16 @@ pdfScript.onload = function(evt) { pdfjs = that.window.PDFJS; if (PDFJS_WORKER_URL) { - // NOTE: the worker script won't actually be run inside a - // real Worker object as it can't be loaded cross-domain - // from the sandboxed iframe ("data:" vs. "https"). pdfjs.workerSrc = PDFJS_WORKER_URL; } + if (true) { + // We currently cannot use a web worker in a sandboxed iFrame + // and in addition to that Firefox 45+ fail with an uncatchable + // exception (see https://bugzilla.mozilla.org/show_bug.cgi?id=1260388) + // So we always disable the worker for now, making PDF.js running + // in fake worker mode. + pdfjs.disableWorker = true; + } console.log("Using pdf.js " + pdfjs.version + " (build " + pdfjs.build + ")"); that._doOpenFile(source); }; From 765a5c5035dd0149a9a4e6fd16c554afd98b356f Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Tue, 29 Mar 2016 13:41:14 +0200 Subject: [PATCH 2/2] 0.24.12 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index a02285fd..df2b7c30 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +spreed-webrtc-server (0.24.13) trusty; urgency=medium + + * Always disable web worker for PDF.js and no longer rely on PDF.js catching the execption when the worker cannot be started, fixing Firefox 45+. + + -- Simon Eisenmann Tue, 29 Mar 2016 13:40:35 +0200 + spreed-webrtc-server (0.24.12) trusty; urgency=medium * Brought back mediaDevices wrapper for gUM for Firefox >= 38 fixing #263 and #264.