void MessageEvent::initMessageEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue> data, const String& origin, const String& lastEventId, DOMWindow* source, MessagePort* port) { std::unique_ptr<MessagePortArray> ports; if (port) { ports = std::make_unique<MessagePortArray>(); ports->append(port); } initMessageEvent(type, canBubble, cancelable, data, origin, lastEventId, source, WTFMove(ports)); }
// FIXME: remove this when we update the ObjC bindings (bug #28774). void MessageEvent::initMessageEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue> data, const String& origin, const String& lastEventId, DOMWindow* source, MessagePort* port) { OwnPtr<MessagePortArray> ports; if (port) { ports = adoptPtr(new MessagePortArray); ports->append(port); } initMessageEvent(type, canBubble, cancelable, data, origin, lastEventId, source, ports.release()); }
JSC::JSValue JSMessageEvent::webkitInitMessageEvent(JSC::ExecState* exec) { return initMessageEvent(exec); }