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

This commit is contained in:
Shih-Chiang Chien 2015-03-19 18:21:32 +08:00
parent 5df22d1a7c
commit 85f7da4736

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();
});
}