Issue #1587 Part 12 (followup 2): Allow clearing of signal by setting to null.

pull/24/head
Moonchild 2 years ago committed by Roy Tam
parent 1ae6431766
commit 70bf74e9d3
  1. 5
      dom/fetch/FetchDriver.cpp
  2. 2
      dom/fetch/Request.cpp
  3. 2
      dom/webidl/Request.webidl

@ -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);

@ -425,7 +425,7 @@ Request::Constructor(const GlobalObject& aGlobal,
}
if (aInit.mSignal.WasPassed()) {
signal = &aInit.mSignal.Value();
signal = aInit.mSignal.Value();
}
if (NS_IsMainThread()) {

@ -53,7 +53,7 @@ dictionary RequestInit {
DOMString integrity;
[Func="AbortController::IsEnabled"]
AbortSignal signal;
AbortSignal? signal;
[Func="FetchObserver::IsEnabled"]
ObserverCallback observe;

Loading…
Cancel
Save