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 | 67c107b025558f2091d6034ccdd4d3a3001bd6a5 (patch) | |
tree | 09bf15856e65236d5310f8c625e68c38559cb718 /dom/fetch | |
parent | 11d3ee59de39bfca63dd0e80decd9cce6e60a3c6 (diff) | |
download | aura-central-67c107b025558f2091d6034ccdd4d3a3001bd6a5.tar.gz |
Issue mcp-graveyard/UXP%1587 - Part 9: Immediately reject an already-aborted signal
Diffstat (limited to 'dom/fetch')
-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; |