зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 8936320bf355 (bug 1359017)
This commit is contained in:
Родитель
e313ec3dd9
Коммит
db70a75d27
|
@ -68,7 +68,6 @@ public:
|
|||
void Close();
|
||||
|
||||
IMPL_EVENT_HANDLER(message)
|
||||
IMPL_EVENT_HANDLER(messageerror)
|
||||
|
||||
void Shutdown();
|
||||
|
||||
|
|
|
@ -80,10 +80,10 @@ BroadcastChannelChild::RecvNotify(const ClonedMessageData& aData)
|
|||
JSContext* cx = jsapi.cx();
|
||||
JS::Rooted<JS::Value> 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> event =
|
||||
MessageEvent::Constructor(mBC, NS_LITERAL_STRING("messageerror"), init);
|
||||
event->SetTrusted(true);
|
||||
|
||||
bool dummy;
|
||||
mBC->DispatchEvent(event, &dummy);
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче