diff --git a/dom/broadcastchannel/BroadcastChannel.h b/dom/broadcastchannel/BroadcastChannel.h index 2cd0b82124c7..a2c04f015e01 100644 --- a/dom/broadcastchannel/BroadcastChannel.h +++ b/dom/broadcastchannel/BroadcastChannel.h @@ -68,7 +68,6 @@ public: void Close(); IMPL_EVENT_HANDLER(message) - IMPL_EVENT_HANDLER(messageerror) void Shutdown(); diff --git a/dom/broadcastchannel/BroadcastChannelChild.cpp b/dom/broadcastchannel/BroadcastChannelChild.cpp index 4278e194a5b5..0eba84ea65fa 100644 --- a/dom/broadcastchannel/BroadcastChannelChild.cpp +++ b/dom/broadcastchannel/BroadcastChannelChild.cpp @@ -80,10 +80,10 @@ BroadcastChannelChild::RecvNotify(const ClonedMessageData& aData) JSContext* cx = jsapi.cx(); JS::Rooted value(cx, JS::NullValue()); if (cloneData.DataLength()) { - IgnoredErrorResult rv; + ErrorResult rv; cloneData.Read(cx, &value, rv); if (NS_WARN_IF(rv.Failed())) { - DispatchError(); + rv.SuppressException(); return IPC_OK(); } } @@ -111,21 +111,5 @@ BroadcastChannelChild::ActorDestroy(ActorDestroyReason aWhy) mActorDestroyed = true; } -void -BroadcastChannelChild::DispatchError() -{ - MessageEventInit init; - init.mBubbles = false; - init.mCancelable = false; - init.mOrigin = mOrigin; - - RefPtr event = - MessageEvent::Constructor(mBC, NS_LITERAL_STRING("messageerror"), init); - event->SetTrusted(true); - - bool dummy; - mBC->DispatchEvent(event, &dummy); -} - } // namespace dom } // namespace mozilla diff --git a/dom/broadcastchannel/BroadcastChannelChild.h b/dom/broadcastchannel/BroadcastChannelChild.h index 8fd6eb2e0b55..a85012365a87 100644 --- a/dom/broadcastchannel/BroadcastChannelChild.h +++ b/dom/broadcastchannel/BroadcastChannelChild.h @@ -44,8 +44,6 @@ private: virtual void ActorDestroy(ActorDestroyReason aWhy) override; - void DispatchError(); - // This raw pointer is actually the parent object. // It's set to null when the parent object is deleted. BroadcastChannel* mBC; diff --git a/dom/webidl/BroadcastChannel.webidl b/dom/webidl/BroadcastChannel.webidl index fb0b639f786a..70be23522f2c 100644 --- a/dom/webidl/BroadcastChannel.webidl +++ b/dom/webidl/BroadcastChannel.webidl @@ -4,7 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * For more information on this interface, please see - * https://html.spec.whatwg.org/#broadcastchannel + * http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts */ [Constructor(DOMString channel), @@ -17,6 +17,5 @@ interface BroadcastChannel : EventTarget { void close(); - attribute EventHandler onmessage; - attribute EventHandler onmessageerror; + attribute EventHandler onmessage; };