From 40983e6db4683d019f1875feae3eb047bead3eeb Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 4 Aug 2014 14:26:36 -0400 Subject: [PATCH] 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 --- src/javascript/opensrf.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.11.0