From a04d67dd12d4999b28e74744150770482a3c5a3d Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 10 Jun 2020 21:51:44 +0000 Subject: Issue #1587 - Part 3: Hook FetchSignal up to the Fetch API --- dom/fetch/FetchSignal.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'dom/fetch/FetchSignal.cpp') diff --git a/dom/fetch/FetchSignal.cpp b/dom/fetch/FetchSignal.cpp index 1924263e8..07ad6b53d 100644 --- a/dom/fetch/FetchSignal.cpp +++ b/dom/fetch/FetchSignal.cpp @@ -37,6 +37,10 @@ FetchSignal::FetchSignal(FetchController* aController, , mAborted(aAborted) {} +FetchSignal::FetchSignal(bool aAborted) + : mAborted(aAborted) +{} + JSObject* FetchSignal::WrapObject(JSContext* aCx, JS::Handle aGivenProto) { @@ -95,6 +99,10 @@ FetchSignal::CanAcceptFollower(FetchSignal::Follower* aFollower) const { MOZ_DIAGNOSTIC_ASSERT(aFollower); + if (!mController) { + return true; + } + if (aFollower == mController) { return false; } -- cgit v1.2.3