bool SharedMemory::Handle::decode(CoreIPC::ArgumentDecoder& decoder, Handle& handle) { ASSERT(!handle.m_port); ASSERT(!handle.m_size); uint64_t size; if (!decoder.decode(size)) return false; CoreIPC::MachPort machPort; if (!decoder.decode(machPort)) return false; handle.m_size = size; handle.m_port = machPort.port(); return true; }
void PluginProcessProxy::didCreateWebProcessConnection(const CoreIPC::MachPort& machPort) { ASSERT(!m_pendingConnectionReplies.isEmpty()); // Grab the first pending connection reply. RefPtr<Messages::WebProcessProxy::GetPluginProcessConnection::DelayedReply> reply = m_pendingConnectionReplies.takeFirst(); reply->send(CoreIPC::MachPort(machPort.port(), MACH_MSG_TYPE_MOVE_SEND)); }
void PluginProcessProxy::didCreateWebProcessConnection(const CoreIPC::MachPort& machPort) { ASSERT(!m_pendingConnectionReplies.isEmpty()); // Grab the first pending connection reply. RefPtr<WebProcessProxy> replyWebProcessProxy = m_pendingConnectionReplies.first().first.release(); CoreIPC::ArgumentEncoder* reply = m_pendingConnectionReplies.first().second; m_pendingConnectionReplies.removeFirst(); // FIXME: This is Mac specific. reply->encode(CoreIPC::MachPort(machPort.port(), MACH_MSG_TYPE_MOVE_SEND)); replyWebProcessProxy->connection()->sendSyncReply(reply); }