Issue #1442 - Part 12 - Label FetchBody. https://bugzilla.mozilla.org/show_bug.cgi?id=1363318 FetchSignal is not in our tree so this is a partial patch to get mOwner changes. Pre-requisite for Part 13.

This commit is contained in:
Brian Smith 2023-09-28 16:54:19 -05:00 committed by roytam1
commit 346e8a87d7
6 changed files with 17 additions and 10 deletions

View file

@ -877,22 +877,27 @@ ExtractByteStreamFromBody(const fetch::ResponseBodyInit& aBodyInit,
template <class Derived>
FetchBody<Derived>::FetchBody()
FetchBody<Derived>::FetchBody(nsIGlobalObject* aOwner)
: mWorkerPrivate(nullptr)
, mOwner(aOwner)
, mReadableStreamBody(nullptr)
, mBodyUsed(false)
{
MOZ_ASSERT(aOwner);
if (!NS_IsMainThread()) {
mWorkerPrivate = GetCurrentThreadWorkerPrivate();
MOZ_ASSERT(mWorkerPrivate);
} else {
mWorkerPrivate = nullptr;
}
}
template
FetchBody<Request>::FetchBody();
FetchBody<Request>::FetchBody(nsIGlobalObject* aOwner);
template
FetchBody<Response>::FetchBody();
FetchBody<Response>::FetchBody(nsIGlobalObject* aOwner);
template <class Derived>
FetchBody<Derived>::~FetchBody()