Bug 906839 - enable by default social.allowMultipleWorkers - fix a port closed error, r=markh.
☠☠ backed out by 9558ebb23f8d ☠ ☠
authorShane Caraveo <scaraveo@mozilla.com>
Thu, 24 Oct 2013 15:53:37 +0200
changeset 165904 6c3eb5fd4ade2bdc433f1a9015106e43153b353e
parent 165903 9eaf00ec189aa84b2f03a8249854fad9b2ccb441
child 165905 cfd30965638a5b72202d702f129d857fcabd400e
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs906839
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 906839 - enable by default social.allowMultipleWorkers - fix a port closed error, r=markh.
browser/base/content/test/social/browser_social_flyout.js
--- a/browser/base/content/test/social/browser_social_flyout.js
+++ b/browser/base/content/test/social/browser_social_flyout.js
@@ -108,25 +108,27 @@ var tests = {
     ok(port, "provider has a port");
     port.onmessage = function (e) {
       let topic = e.data.topic;
       switch (topic) {
         case "test-init-done":
           port.postMessage({topic: "test-flyout-open"});
           break;
         case "got-flyout-visibility":
+          if (e.data.result != "shown")
+            return;
           let iframe = panel.firstChild;
           iframe.contentDocument.addEventListener("SocialTest-DoneCloseSelf", function _doneHandler() {
             iframe.contentDocument.removeEventListener("SocialTest-DoneCloseSelf", _doneHandler, false);
+            port.close();
             is(panel.state, "closed", "flyout should have closed itself");
             Services.prefs.setBoolPref(ALLOW_SCRIPTS_TO_CLOSE_PREF, oldAllowScriptsToClose);
             next();
           }, false);
           is(panel.state, "open", "flyout should be open");
-          port.close(); // so we don't get the -visibility message as it hides...
           SocialFlyout.dispatchPanelEvent("socialTest-CloseSelf");
           break;
       }
     }
     port.postMessage({topic: "test-init"});
   },
 
   testCloseOnLinkTraversal: function(next) {