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 | |
parent | 94c694d389ceb2c797d7ee1854cc84c87349c2f5 (diff) | |
download | uxp-1c97314804cff846def08b122efb32d514bd1a09.tar.gz |
Issue #1587 - Part 9: Immediately reject an already-aborted signal
-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 4dbe2de0a1..191f4cfc3e 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; |