Bug 811102 test followup: terminate worker to avoid leak, r=markh, a=tests
authorGavin Sharp <gavin@gavinsharp.com>
Mon, 12 Nov 2012 20:38:12 -0800
changeset 109815 a5ec489a0ab986c94124534168456d78336402b6
parent 109814 731c85bd8e9ea18be9ee1370a1fbc0dee632a54d
child 109816 be03b1063c9ab58862c78b3e7d6851adff7cdfbf
child 109818 7828657f1c2a7c809426776b74c0fc89e18cf9d3
child 109820 0dbbf9b3175cc960a8a67998dd34ef4b8fd5f01f
push id1
push usersledru@mozilla.com
push dateThu, 04 Dec 2014 17:57:20 +0000
reviewersmarkh, tests
bugs811102
milestone17.0
Bug 811102 test followup: terminate worker to avoid leak, r=markh, a=tests
toolkit/components/social/test/browser/browser_frameworker.js
--- a/toolkit/components/social/test/browser/browser_frameworker.js
+++ b/toolkit/components/social/test/browser/browser_frameworker.js
@@ -540,15 +540,17 @@ let tests = {
       if (e.data.topic == "ready" && !doneReload) {
         // do the "reload"
         doneReload = true;
         worker._worker.reload();
         let worker2 = getFrameWorkerHandle(makeWorkerUrl(run),
                                            undefined, "testReloadAndNewPort");
         worker2.port.onmessage = function(e) {
           if (e.data.topic == "ready") {
+            // "worker" and "worker2" are handles to the same worker
+            worker2.terminate();
             cbnext();
           }
         }
       }
     }
   },
 }