diff options
Diffstat (limited to 'dom/fetch/FetchConsumer.h')
-rw-r--r-- | dom/fetch/FetchConsumer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dom/fetch/FetchConsumer.h b/dom/fetch/FetchConsumer.h index 2b5725342..77af09d9b 100644 --- a/dom/fetch/FetchConsumer.h +++ b/dom/fetch/FetchConsumer.h @@ -11,6 +11,7 @@ #include "nsIInputStream.h" #include "nsIObserver.h" #include "nsWeakReference.h" +#include "mozilla/dom/AbortSignal.h" #include "mozilla/dom/MutableBlobStorage.h" class nsIThread; @@ -34,6 +35,7 @@ template <class Derived> class FetchBody; template <class Derived> class FetchBodyConsumer final : public nsIObserver , public nsSupportsWeakReference + , public AbortSignal::Follower { public: NS_DECL_THREADSAFE_ISUPPORTS @@ -42,6 +44,7 @@ public: static already_AddRefed<Promise> Create(nsIGlobalObject* aGlobal, FetchBody<Derived>* aBody, + AbortSignal* aSignal, FetchConsumeType aType, ErrorResult& aRv); @@ -73,6 +76,9 @@ public: mConsumeBodyPump = nullptr; } + // Override AbortSignal::Follower::Aborted + void Aborted() override; + private: FetchBodyConsumer(nsIGlobalObject* aGlobalObject, workers::WorkerPrivate* aWorkerPrivate, |