LP#1268619 disable shared workers pending browser issues collab/berick/websockets
authorBill Erickson <berick@esilibrary.com>
Mon, 4 Aug 2014 18:26:36 +0000 (14:26 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 4 Aug 2014 18:26:36 +0000 (14:26 -0400)
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>
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