Bug 1133763 - Part 2: Transfer the security info associated with an InternalResponse across the IPC layer; r=bkelly

This commit is contained in:
Ehsan Akhgari 2015-03-04 16:18:47 -05:00
parent 0f129374d0
commit 33f9e79fa1
2 changed files with 4 additions and 0 deletions

View File

@ -69,6 +69,7 @@ struct PCacheResponse
PHeadersEntry[] headers;
HeadersGuardEnum headersGuard;
PCacheReadStreamOrVoid body;
nsCString securityInfo;
};
union PCacheResponseOrVoid

View File

@ -233,6 +233,7 @@ TypeUtils::ToPCacheResponseWithoutBody(PCacheResponse& aOut,
MOZ_ASSERT(headers);
headers->GetPHeaders(aOut.headers());
aOut.headersGuard() = headers->Guard();
aOut.securityInfo() = aIn.GetSecurityInfo();
}
void
@ -318,6 +319,8 @@ TypeUtils::ToResponse(const PCacheResponse& aIn)
ir->Headers()->Fill(*internalHeaders, result);
MOZ_ASSERT(!result.Failed());
ir->SetSecurityInfo(aIn.securityInfo());
nsCOMPtr<nsIInputStream> stream = ReadStream::Create(aIn.body());
ir->SetBody(stream);