diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-24 11:09:54 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-28 10:38:04 +0000 |
commit | 71848c23a4d09bbb7eff1b27d2cb28904e35240d (patch) | |
tree | 3ee22a605fd936c5e97ce1c4baf18c33d1f17407 /dom/fetch/Request.h | |
parent | 1d321e689e7dcad9cf9519c19e0710c6bf1333a7 (diff) | |
download | UXP-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/Request.h')
-rw-r--r-- | dom/fetch/Request.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/dom/fetch/Request.h b/dom/fetch/Request.h index f6fe9be7b..34cbc52cf 100644 --- a/dom/fetch/Request.h +++ b/dom/fetch/Request.h @@ -33,7 +33,7 @@ class Request final : public nsISupports NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Request) public: - Request(nsIGlobalObject* aOwner, InternalRequest* aRequest); + Request(nsIGlobalObject* aOwner, InternalRequest* aRequest, AbortSignal* aSignal); static bool RequestContextEnabled(JSContext* aCx, JSObject* aObj); @@ -142,7 +142,7 @@ public: } already_AddRefed<Request> - Clone(ErrorResult& aRv) const; + Clone(ErrorResult& aRv); already_AddRefed<InternalRequest> GetInternalRequest(); @@ -153,13 +153,22 @@ public: return mRequest->GetPrincipalInfo(); } + AbortSignal*
+ GetOrCreateSignal();
+
+ // This can return a null AbortSignal.
+ AbortSignal*
+ GetSignal() const override;
+ private: ~Request(); nsCOMPtr<nsIGlobalObject> mOwner; RefPtr<InternalRequest> mRequest; + // Lazily created. RefPtr<Headers> mHeaders; + RefPtr<AbortSignal> mSignal; }; } // namespace dom |