mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-17 20:57:30 +09:00
Issue #1587 Part 11 (followup 1): Implement multithreaded signals for workers.
This commit is contained in:
parent
95c5a64b1f
commit
1ae6431766
13 changed files with 823 additions and 728 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue