diff options
author | Moonchild <moonchild@palemoon.org> | 2020-07-25 17:31:58 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-07-25 17:31:58 +0000 |
commit | f0ef003f36904d81ea5762c8879496bc355ac5b0 (patch) | |
tree | 71aa3b3dfefb9bc78caf8267856ade7dcb5420af | |
parent | 84cb854842cb4aecc2a3bee93c7a2698715643c8 (diff) | |
download | uxp-f0ef003f36904d81ea5762c8879496bc355ac5b0.tar.gz |
Issue #1587 Part 12 (followup 2): Allow clearing of signal by setting to null.
-rw-r--r-- | dom/fetch/FetchDriver.cpp | 5 | ||||
-rw-r--r-- | dom/fetch/Request.cpp | 2 | ||||
-rw-r--r-- | dom/webidl/Request.webidl | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/dom/fetch/FetchDriver.cpp b/dom/fetch/FetchDriver.cpp index 067e32db48..fd1e99a2b6 100644 --- a/dom/fetch/FetchDriver.cpp +++ b/dom/fetch/FetchDriver.cpp @@ -499,6 +499,11 @@ FetchDriver::OnStartRequest(nsIRequest* aRequest, return rv; } + if (!mChannel) { + MOZ_ASSERT(!mObserver); + return NS_BINDING_ABORTED; + } + // We should only get to the following code once. MOZ_ASSERT(!mPipeOutputStream); MOZ_ASSERT(mObserver); diff --git a/dom/fetch/Request.cpp b/dom/fetch/Request.cpp index ba268d3310..76f3ce5c51 100644 --- a/dom/fetch/Request.cpp +++ b/dom/fetch/Request.cpp @@ -425,7 +425,7 @@ Request::Constructor(const GlobalObject& aGlobal, } if (aInit.mSignal.WasPassed()) { - signal = &aInit.mSignal.Value(); + signal = aInit.mSignal.Value(); } if (NS_IsMainThread()) { diff --git a/dom/webidl/Request.webidl b/dom/webidl/Request.webidl index 57bea5db61..9140543e7b 100644 --- a/dom/webidl/Request.webidl +++ b/dom/webidl/Request.webidl @@ -53,7 +53,7 @@ dictionary RequestInit { DOMString integrity; [Func="AbortController::IsEnabled"] - AbortSignal signal; + AbortSignal? signal; [Func="FetchObserver::IsEnabled"] ObserverCallback observe; |