void FlyWebPublishedServerChild::OnWebSocketResponse(InternalRequest* aRequest, InternalResponse* aResponse) { LOG_I("FlyWebPublishedServerChild::OnFetchResponse(%p)", this); if (!mActorExists) { LOG_I("FlyWebPublishedServerChild::OnFetchResponse(%p) - No actor!", this); return; } uint64_t id = mPendingRequests.Get(aRequest); MOZ_ASSERT(id); mPendingRequests.Remove(aRequest); mPendingTransportProviders.Remove(id); IPCInternalResponse ipcResp; UniquePtr<mozilla::ipc::AutoIPCStream> autoStream; nsIContentChild* cc = static_cast<ContentChild*>(Manager()); aResponse->ToIPC(&ipcResp, cc, autoStream); Unused << SendWebSocketResponse(ipcResp, id); if (autoStream) { autoStream->TakeOptionalValue(); } }
void FlyWebPublishedServerChild::OnFetchResponse(InternalRequest* aRequest, InternalResponse* aResponse) { LOG_I("FlyWebPublishedServerChild::OnFetchResponse(%p)", this); if (mActorDestroyed) { LOG_I("FlyWebPublishedServerChild::OnFetchResponse(%p) - No actor!", this); return; } uint64_t id = mPendingRequests.Get(aRequest); MOZ_ASSERT(id); mPendingRequests.Remove(aRequest); IPCInternalResponse ipcResp; UniquePtr<mozilla::ipc::AutoIPCStream> autoStream; aResponse->ToIPC(&ipcResp, Manager(), autoStream); Unused << SendFetchResponse(ipcResp, id); if (autoStream) { autoStream->TakeOptionalValue(); } }