Backed out changeset a8d6f6fd7bda (bug 1359017) for failing wpt's /html/dom/reflection-forms.html. r=backout

This commit is contained in:
Sebastian Hengst 2017-09-13 08:56:53 +02:00
parent 92d408093a
commit 643376d693
4 changed files with 2 additions and 33 deletions

View File

@ -920,7 +920,6 @@ GK_ATOM(onloadingerror, "onloadingerror")
GK_ATOM(onpopstate, "onpopstate")
GK_ATOM(only, "only") // this one is not an event
GK_ATOM(onmessage, "onmessage")
GK_ATOM(onmessageerror, "onmessageerror")
GK_ATOM(onmousedown, "onmousedown")
GK_ATOM(onmouseenter, "onmouseenter")
GK_ATOM(onmouseleave, "onmouseleave")

View File

@ -137,7 +137,6 @@ private:
}
if (NS_WARN_IF(rv.Failed())) {
mPort->DispatchError();
return rv.StealNSResult();
}
@ -149,7 +148,6 @@ private:
Sequence<OwningNonNull<MessagePort>> ports;
if (!mData->TakeTransferredPortsAsSequence(ports)) {
mPort->DispatchError();
return NS_ERROR_OUT_OF_MEMORY;
}
@ -696,7 +694,7 @@ MessagePort::Entangled(nsTArray<ClonedMessageData>& aMessages)
FallibleTArray<RefPtr<SharedMessagePortMessage>> data;
if (NS_WARN_IF(!SharedMessagePortMessage::FromMessagesToSharedChild(aMessages,
data))) {
DispatchError();
// OOM, we cannot continue.
return;
}
@ -750,7 +748,7 @@ MessagePort::MessagesReceived(nsTArray<ClonedMessageData>& aMessages)
FallibleTArray<RefPtr<SharedMessagePortMessage>> data;
if (NS_WARN_IF(!SharedMessagePortMessage::FromMessagesToSharedChild(aMessages,
data))) {
DispatchError();
// OOM, We cannot continue.
return;
}
@ -1006,28 +1004,5 @@ MessagePort::ForceClose(const MessagePortIdentifier& aIdentifier)
ForceCloseHelper::ForceClose(aIdentifier);
}
void
MessagePort::DispatchError()
{
nsCOMPtr<nsIGlobalObject> globalObject = GetParentObject();
AutoJSAPI jsapi;
if (!globalObject || !jsapi.Init(globalObject)) {
NS_WARNING("Failed to initialize AutoJSAPI object.");
return;
}
RootedDictionary<MessageEventInit> init(jsapi.cx());
init.mBubbles = false;
init.mCancelable = false;
RefPtr<Event> event =
MessageEvent::Constructor(this, NS_LITERAL_STRING("messageerror"), init);
event->SetTrusted(true);
bool dummy;
DispatchEvent(event, &dummy);
}
} // namespace dom
} // namespace mozilla

View File

@ -74,8 +74,6 @@ public:
void SetOnmessage(EventHandlerNonNull* aCallback);
IMPL_EVENT_HANDLER(messageerror)
// Non WebIDL methods
void UnshippedEntangle(MessagePort* aEntangledPort);
@ -149,8 +147,6 @@ private:
// Dispatch events from the Message Queue using a nsRunnable.
void Dispatch();
void DispatchError();
void StartDisentangling();
void Disentangle();

View File

@ -17,6 +17,5 @@ interface MessagePort : EventTarget {
// event handlers
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
};
// MessagePort implements Transferable;