Bug 1080130 - unreferenced socket might be closed before opened. r=khuey.

--HG--
extra : rebase_source : 17fde78c4efc03a1284468bc521c1309ea4ca475
This commit is contained in:
Shih-Chiang Chien 2015-03-19 18:21:32 +08:00
parent cf9f023525
commit 2930c8d77a

View File

@ -312,13 +312,13 @@ function testCloseBeforeOpened() {
function testOpenWithoutClose() {
info('test for open without close');
let opened = [];
let closed = [];
for (let i = 0; i < 50; i++) {
let socket = new UDPSocket();
opened.push(socket.opened);
closed.push(socket.closed);
}
return Promise.all(opened);
return Promise.all(closed);
}
function testBFCache() {
@ -377,6 +377,10 @@ function runTest() {
.then(function() {
info('test finished');
SimpleTest.finish();
})
.catch(function(err) {
ok(false, 'test failed due to: ' + err);
SimpleTest.finish();
});
}