Bug 1221852 - SharedWorker.port should be always not null, r=smaug

This commit is contained in:
Andrea Marchesini 2015-11-17 23:38:39 +00:00
parent a70b6b3282
commit 15dd6c71e1
3 changed files with 4 additions and 1 deletions

View File

@ -136,7 +136,6 @@ SharedWorker::Close()
if (mMessagePort) {
mMessagePort->Close();
mMessagePort = nullptr;
}
}

View File

@ -17,6 +17,7 @@ onconnect = function(evt) {
test: (evtFromPort2.data.type == "connected"),
msg: "The original message received" });
port.postMessage({type: "finish"});
close();
}
}
}

View File

@ -28,6 +28,9 @@ sw1.port.onmessage = function(event) {
}
if (event.data.type == "finish") {
info("Finished!");
ok(sw1.port, "The port still exists");
sw1.port.foo = sw1; // Just a test to see if we leak.
SimpleTest.finish();
}
}