LP#1268619: disable shared workers pending browser issues
authorBill Erickson <berick@esilibrary.com>
Mon, 4 Aug 2014 18:26:36 +0000 (14:26 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 19 Aug 2014 22:54:47 +0000 (15:54 -0700)
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 <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>

src/javascript/opensrf.js

index 29cf6bf..ecc012d 100644 (file)
@@ -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