From: Bill Erickson Date: Mon, 4 Aug 2014 18:26:36 +0000 (-0400) Subject: LP#1268619: disable shared workers pending browser issues X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2677f8e815a61f9b808bb57647f6ec9d448f0268;p=working%2FOpenSRF.git LP#1268619: disable shared workers pending browser issues There appears to be a bug in Chromium where loading the same page multiple times (without a refresh or cache clear) causes the SharedWorker to fail to instantiate on every other page load. Further research pending. Disabling SharedWorker's entirely for now. Note, to replicate, load a page using shared workers, focus the browser address bar, hit Enter to load the page again. The shared worker will fail to load on every other page load, though it will appear to the SharedWorker caller (opensrf.js) that the port is open. Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- diff --git a/src/javascript/opensrf.js b/src/javascript/opensrf.js index 29cf6bf..ecc012d 100644 --- a/src/javascript/opensrf.js +++ b/src/javascript/opensrf.js @@ -257,7 +257,12 @@ OpenSRF.websocketConnected = function() { OpenSRF.Session.prototype.send_ws = function(osrf_msg) { - if (typeof SharedWorker == 'function' + // XXX there appears to be a bug in Chromium where loading the + // same page multiple times (without a refresh or cache clear) + // causes the SharedWorker to fail to instantiate on + // every other page load. Disabling SharedWorker's entirely + // for now. + if (false /* ^-- */ && typeof SharedWorker == 'function' /* * https://bugzilla.mozilla.org/show_bug.cgi?id=504553#c73