Backed out changeset b92e26454745 (bug 1622124) for causing failures in test_broadcastchannel_close2.html

CLOSED TREE
This commit is contained in:
Mihai Alexandru Michis 2020-03-16 21:44:27 +02:00
parent 77fba7508b
commit 2b06d42785
4 changed files with 3 additions and 39 deletions

View File

@ -450,11 +450,6 @@ void BroadcastChannel::MessageReceived(const MessageData& aData) {
return;
}
// Let's ignore messages after a close/shutdown.
if (mState != StateActive) {
return;
}
nsCOMPtr<nsIGlobalObject> globalObject;
if (NS_IsMainThread()) {

View File

@ -27,4 +27,3 @@ skip-if = (os == "win" && processor == "aarch64") #bug 1535784
[test_ordering.html]
[test_dataCloning.html]
[test_dataURL.html]
[test_message_after_close.html]

View File

@ -1,33 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for BroadcastChannel - message after close</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<script>
SimpleTest.waitForExplicitFinish();
let a = new BroadcastChannel('a');
let b = new BroadcastChannel('a');
let count = 0;
a.onmessage = function(e) {
++count;
a.close();
setTimeout(() => {
is(count, 1, "Only 1 message received");
SimpleTest.finish();
}, 0);
}
for (let i = 0; i < 100; ++i) {
b.postMessage(42);
}
</script>
</body>
</html>

View File

@ -1,4 +1,7 @@
[basics.html]
[Closing a channel in onmessage prevents already queued tasks from firing onmessage events]
expected: FAIL
[messages aren't delivered to a port closed after calling postMessage.]
expected:
if (os == "linux") and fission and not debug: ["PASS", "FAIL"]