Bug 1819742 - Directly set up stream according to the IPC stream type in InternalRequest. r=dom-worker-reviewers,smaug

Differential Revision: https://phabricator.services.mozilla.com/D171450
This commit is contained in:
Eden Chuang 2023-03-02 17:44:45 +00:00
parent 5ddfea87da
commit dff80ae68e

View File

@ -190,14 +190,11 @@ InternalRequest::InternalRequest(const IPCInternalRequest& aIPCRequest)
const Maybe<BodyStreamVariant>& body = aIPCRequest.body();
if (!XRE_IsParentProcess()) {
if (body) {
MOZ_ASSERT(body->type() == BodyStreamVariant::TParentToChildStream);
if (body->type() == BodyStreamVariant::TParentToChildStream) {
mBodyStream = body->get_ParentToChildStream().get_RemoteLazyInputStream();
}
} else {
if (body) {
MOZ_ASSERT(body->type() == BodyStreamVariant::TChildToParentStream);
if (body->type() == BodyStreamVariant::TChildToParentStream) {
mBodyStream =
DeserializeIPCStream(body->get_ChildToParentStream().stream());
}