diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-27 00:16:27 +0200 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-27 00:16:27 +0200 |
commit | 1977b8de3e4d0a2af9d34fa90b5584e439155fcb (patch) | |
tree | edfb684fae8fefeed0bd68e43ab1e199744e7ab4 /dom/fetch/FetchConsumer.h | |
parent | 1e0bb1d355ffd55311f9544b35cff2a58b0340a8 (diff) | |
parent | 62640d775aac66d3aa6abdda0a6d69d97e7eca37 (diff) | |
download | UXP-1977b8de3e4d0a2af9d34fa90b5584e439155fcb.tar UXP-1977b8de3e4d0a2af9d34fa90b5584e439155fcb.tar.gz UXP-1977b8de3e4d0a2af9d34fa90b5584e439155fcb.tar.lz UXP-1977b8de3e4d0a2af9d34fa90b5584e439155fcb.tar.xz UXP-1977b8de3e4d0a2af9d34fa90b5584e439155fcb.zip |
Merge branch 'abortcontroller-work'
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, |