Issue #1442 - Part 13 - Implement FetchStreamReader. https://bugzilla.mozilla.org/show_bug.cgi?id=1329298

This commit is contained in:
Brian Smith 2023-09-28 17:36:52 -05:00 committed by roytam1
commit ef550b2579
10 changed files with 569 additions and 62 deletions

View file

@ -139,18 +139,18 @@ InternalResponse::ToIPC(IPCInternalResponse* aIPCResponse,
}
already_AddRefed<InternalResponse>
InternalResponse::Clone()
InternalResponse::Clone(CloneType aCloneType)
{
RefPtr<InternalResponse> clone = CreateIncompleteCopy();
clone->mHeaders = new InternalHeaders(*mHeaders);
if (mWrappedResponse) {
clone->mWrappedResponse = mWrappedResponse->Clone();
clone->mWrappedResponse = mWrappedResponse->Clone(aCloneType);
MOZ_ASSERT(!mBody);
return clone.forget();
}
if (!mBody) {
if (!mBody || aCloneType == eDontCloneInputStream) {
return clone.forget();
}