mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1221852 - SharedWorker.port should be always not null, r=smaug
This commit is contained in:
parent
5805634945
commit
ea64674637
@ -136,7 +136,6 @@ SharedWorker::Close()
|
||||
|
||||
if (mMessagePort) {
|
||||
mMessagePort->Close();
|
||||
mMessagePort = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ onconnect = function(evt) {
|
||||
test: (evtFromPort2.data.type == "connected"),
|
||||
msg: "The original message received" });
|
||||
port.postMessage({type: "finish"});
|
||||
close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user