summaryrefslogtreecommitdiffstats
path: root/dom/fetch/FetchConsumer.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-24 11:09:54 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-28 10:38:04 +0000
commit71848c23a4d09bbb7eff1b27d2cb28904e35240d (patch)
tree3ee22a605fd936c5e97ce1c4baf18c33d1f17407 /dom/fetch/FetchConsumer.h
parent1d321e689e7dcad9cf9519c19e0710c6bf1333a7 (diff)
downloadUXP-71848c23a4d09bbb7eff1b27d2cb28904e35240d.tar
UXP-71848c23a4d09bbb7eff1b27d2cb28904e35240d.tar.gz
UXP-71848c23a4d09bbb7eff1b27d2cb28904e35240d.tar.lz
UXP-71848c23a4d09bbb7eff1b27d2cb28904e35240d.tar.xz
UXP-71848c23a4d09bbb7eff1b27d2cb28904e35240d.zip
Issue #1587 Part 11 (followup 1): Implement multithreaded signals for workers.
Diffstat (limited to 'dom/fetch/FetchConsumer.h')
-rw-r--r--dom/fetch/FetchConsumer.h6
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,