зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1221852 - SharedWorker.port should be always not null, r=smaug
This commit is contained in:
Родитель
5805634945
Коммит
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();
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче