Bug 1344587 - Fix a leak in test_multicast_dns_device_provider.js; r=schien
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 05 Mar 2017 20:01:59 -0500
changeset 346121 8086f1e5317b27a3e2a344c5057f51ea1ef337dc
parent 346120 5a64d16d18e577d63a38c2044ff942ba858ae23b
child 346122 fde4cd0aed6deccd27113ad6519ad31d5f27564a
push id87734
push usereakhgari@mozilla.com
push dateMon, 06 Mar 2017 20:06:24 +0000
treeherdermozilla-inbound@fde4cd0aed6d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersschien
bugs1344587
milestone54.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 1344587 - Fix a leak in test_multicast_dns_device_provider.js; r=schien
dom/presentation/tests/xpcshell/test_multicast_dns_device_provider.js
--- a/dom/presentation/tests/xpcshell/test_multicast_dns_device_provider.js
+++ b/dom/presentation/tests/xpcshell/test_multicast_dns_device_provider.js
@@ -473,16 +473,17 @@ function filterDevice() {
         { requestedUrl: "unknowSchem://example.com", supported: false },
       ];
 
       for (let test of tests) {
         Assert.equal(device.isRequestedUrlSupported(test.requestedUrl), test.supported);
       }
 
       provider.listener = null;
+      provider = null;
       run_next_test();
     },
     updateDevice: function() {},
     removeDevice: function() {},
     onSessionRequest: function() {},
   };
 
   provider.listener = listener;
@@ -830,16 +831,17 @@ function ignoreIncompatibleDevice() {
   deferred.promise.then(function() {
     Assert.equal(mockServerObj.id, mockDevice.host);
 
     // Start discovery
     Services.prefs.setBoolPref(PREF_DISCOVERY, true);
     Assert.equal(listener.count(), 0);
 
     provider.listener = null;
+    provider = null;
 
     run_next_test();
   });
 }
 
 function ignoreSelfDevice() {
   Services.prefs.setBoolPref(PREF_DISCOVERY, false);
   Services.prefs.setBoolPref(PREF_DISCOVERABLE, true);
@@ -913,16 +915,17 @@ function ignoreSelfDevice() {
   deferred.promise.then(() => {
     Assert.equal(mockServerObj.id, mockDevice.host);
 
     // Start discovery
     Services.prefs.setBoolPref(PREF_DISCOVERY, true);
     Assert.equal(listener.count(), 0);
 
     provider.listener = null;
+    provider = null;
 
     run_next_test();
   });
 }
 
 function addDeviceDynamically() {
   Services.prefs.setBoolPref(PREF_DISCOVERY, false);