diff options
author | Moonchild <moonchild@palemoon.org> | 2020-06-12 01:46:48 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-06-12 01:46:48 +0000 |
commit | 1c97314804cff846def08b122efb32d514bd1a09 (patch) | |
tree | 09bf15856e65236d5310f8c625e68c38559cb718 /dom | |
parent | 94c694d389ceb2c797d7ee1854cc84c87349c2f5 (diff) | |
download | UXP-1c97314804cff846def08b122efb32d514bd1a09.tar UXP-1c97314804cff846def08b122efb32d514bd1a09.tar.gz UXP-1c97314804cff846def08b122efb32d514bd1a09.tar.lz UXP-1c97314804cff846def08b122efb32d514bd1a09.tar.xz UXP-1c97314804cff846def08b122efb32d514bd1a09.zip |
Issue #1587 - Part 9: Immediately reject an already-aborted signal
Diffstat (limited to 'dom')
-rw-r--r-- | dom/fetch/Fetch.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dom/fetch/Fetch.cpp b/dom/fetch/Fetch.cpp index 4dbe2de0a..191f4cfc3 100644 --- a/dom/fetch/Fetch.cpp +++ b/dom/fetch/Fetch.cpp @@ -332,7 +332,12 @@ FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput, RefPtr<AbortSignal> signal; if (aInit.mSignal.WasPassed()) { signal = &aInit.mSignal.Value(); - // Let's FetchDriver to deal with an already aborted signal. + } + + if (signal && signal->Aborted()) { + // An already aborted signal should reject immediately. + aRv.Throw(NS_ERROR_DOM_ABORT_ERR); + return nullptr; } RefPtr<FetchObserver> observer; |