Bug 1080130 - Force GC to close all used socket immediately. r=jmaher, a=test-only
authorShih-Chiang Chien <schien@mozilla.com>
Thu, 02 Apr 2015 14:57:29 +0800
changeset 258330 eb178aedaaad
parent 258329 16c909280059
child 258331 9adbbf9a8784
push id4647
push userryanvm@gmail.com
push date2015-04-07 21:15 +0000
treeherdermozilla-beta@6d1efbb2c76c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher, test-only
bugs1080130
milestone38.0
Bug 1080130 - Force GC to close all used socket immediately. r=jmaher, a=test-only
dom/network/tests/test_udpsocket.html
--- a/dom/network/tests/test_udpsocket.html
+++ b/dom/network/tests/test_udpsocket.html
@@ -316,16 +316,19 @@ function testOpenWithoutClose() {
   info('test for open without close');
 
   let closed = [];
   for (let i = 0; i < 50; i++) {
     let socket = new UDPSocket();
     closed.push(socket.closed);
   }
 
+  SpecialPowers.gc();
+  info('all unrefereced socket should be closed right after GC');
+
   return Promise.all(closed);
 }
 
 function testBFCache() {
   info('test for bfcache behavior');
 
   let socket = new UDPSocket();