mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1167808 P0 Cache.put() should use internal body of opaque Response. r=nsm
This commit is contained in:
parent
152d3ac357
commit
8606edd8de
2
dom/cache/TypeUtils.cpp
vendored
2
dom/cache/TypeUtils.cpp
vendored
@ -242,7 +242,7 @@ TypeUtils::ToCacheResponse(CacheResponse& aOut, Response& aIn, ErrorResult& aRv)
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIInputStream> stream;
|
||||
aIn.GetBody(getter_AddRefs(stream));
|
||||
ir->GetInternalBody(getter_AddRefs(stream));
|
||||
if (stream) {
|
||||
aIn.SetBodyUsed();
|
||||
}
|
||||
|
@ -117,6 +117,17 @@ public:
|
||||
return Headers();
|
||||
}
|
||||
|
||||
void
|
||||
GetInternalBody(nsIInputStream** aStream)
|
||||
{
|
||||
if (mWrappedResponse) {
|
||||
MOZ_ASSERT(!mBody);
|
||||
return mWrappedResponse->GetBody(aStream);
|
||||
}
|
||||
nsCOMPtr<nsIInputStream> stream = mBody;
|
||||
stream.forget(aStream);
|
||||
}
|
||||
|
||||
void
|
||||
GetBody(nsIInputStream** aStream)
|
||||
{
|
||||
@ -125,12 +136,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
if (mWrappedResponse) {
|
||||
MOZ_ASSERT(!mBody);
|
||||
return mWrappedResponse->GetBody(aStream);
|
||||
}
|
||||
nsCOMPtr<nsIInputStream> stream = mBody;
|
||||
stream.forget(aStream);
|
||||
return GetInternalBody(aStream);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user