summaryrefslogtreecommitdiffstats
path: root/dom/fetch/Response.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-24 11:09:54 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-24 11:09:54 +0000
commit84cb854842cb4aecc2a3bee93c7a2698715643c8 (patch)
treef28ffddfafdd5da6139e8a33151c8358e35d6b86 /dom/fetch/Response.cpp
parent1e0bb1d355ffd55311f9544b35cff2a58b0340a8 (diff)
downloadUXP-84cb854842cb4aecc2a3bee93c7a2698715643c8.tar
UXP-84cb854842cb4aecc2a3bee93c7a2698715643c8.tar.gz
UXP-84cb854842cb4aecc2a3bee93c7a2698715643c8.tar.lz
UXP-84cb854842cb4aecc2a3bee93c7a2698715643c8.tar.xz
UXP-84cb854842cb4aecc2a3bee93c7a2698715643c8.zip
Issue #1587 Part 11 (followup 1): Implement multithreaded signals for workers.
Diffstat (limited to 'dom/fetch/Response.cpp')
-rw-r--r--dom/fetch/Response.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/dom/fetch/Response.cpp b/dom/fetch/Response.cpp
index e35de0e12..241614286 100644
--- a/dom/fetch/Response.cpp
+++ b/dom/fetch/Response.cpp
@@ -34,10 +34,11 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Response)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
-Response::Response(nsIGlobalObject* aGlobal, InternalResponse* aInternalResponse)
+Response::Response(nsIGlobalObject* aGlobal, InternalResponse* aInternalResponse, AbortSignal* aSignal)
: FetchBody<Response>()
, mOwner(aGlobal)
, mInternalResponse(aInternalResponse)
+ , mSignal(aSignal)
{
MOZ_ASSERT(aInternalResponse->Headers()->Guard() == HeadersGuardEnum::Immutable ||
aInternalResponse->Headers()->Guard() == HeadersGuardEnum::Response);
@@ -53,7 +54,7 @@ Response::Error(const GlobalObject& aGlobal)
{
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
RefPtr<InternalResponse> error = InternalResponse::NetworkError();
- RefPtr<Response> r = new Response(global, error);
+ RefPtr<Response> r = new Response(global, error, nullptr);
return r.forget();
}
@@ -173,7 +174,7 @@ Response::Constructor(const GlobalObject& aGlobal,
internalResponse->InitChannelInfo(worker->GetChannelInfo());
}
- RefPtr<Response> r = new Response(global, internalResponse);
+ RefPtr<Response> r = new Response(global, internalResponse, nullptr);
if (aInit.mHeaders.WasPassed()) {
internalResponse->Headers()->Clear();
@@ -236,7 +237,7 @@ Response::Clone(ErrorResult& aRv) const
}
RefPtr<InternalResponse> ir = mInternalResponse->Clone();
- RefPtr<Response> response = new Response(mOwner, ir);
+ RefPtr<Response> response = new Response(mOwner, ir, mSignal);
return response.forget();
}
@@ -250,7 +251,7 @@ Response::CloneUnfiltered(ErrorResult& aRv) const
RefPtr<InternalResponse> clone = mInternalResponse->Clone();
RefPtr<InternalResponse> ir = clone->Unfiltered();
- RefPtr<Response> ref = new Response(mOwner, ir);
+ RefPtr<Response> ref = new Response(mOwner, ir, mSignal);
return ref.forget();
}