Bug 1333898 - MessageChannel messaging sets .ports to null, r=qdot

This commit is contained in:
Andrea Marchesini 2017-01-31 08:47:11 +01:00
Родитель 97a3868830
Коммит dd65bf8d09
4 изменённых файлов: 3 добавлений и 12 удалений

Просмотреть файл

@ -53,7 +53,7 @@ function* testDirectorScriptMessagePort(directorManager) {
exports.attach = function ({port}) {
port.onmessage = function (evt) {
// echo messages
evt.source.postMessage(evt.data);
evt.target.postMessage(evt.data);
};
};
}).toString() + ")();",

Просмотреть файл

@ -81,7 +81,7 @@ function runDirectorRegistryActorTest() {
module.exports = function({port}) {
port.onmessage = function(evt) {
// echo messages
evt.source.postMessage(evt.data);
evt.target.postMessage(evt.data);
};
};
}).toString() + ")();",

Просмотреть файл

@ -139,13 +139,10 @@ private:
return NS_ERROR_OUT_OF_MEMORY;
}
Nullable<WindowProxyOrMessagePort> source;
source.SetValue().SetAsMessagePort() = mPort;
event->InitMessageEvent(nullptr, NS_LITERAL_STRING("message"),
false /* non-bubbling */,
false /* cancelable */, value, EmptyString(),
EmptyString(), source, ports);
EmptyString(), nullptr, ports);
event->SetTrusted(true);
bool dummy;

Просмотреть файл

@ -1,6 +0,0 @@
[postMessage_event_properties.htm]
type: testharness
[ postMessage(): MessageEvent properties ]
expected: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=952139