From 086e35f3d2b2fd1961d648f2df9b4a350fff707f Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Wed, 17 May 2023 15:36:46 +0200 Subject: [PATCH] Account for removal of AbortSignal's follow See https://github.com/whatwg/dom/pull/1152 for context. Tests: https://github.com/web-platform-tests/wpt/pull/39951. SW PR: https://github.com/w3c/ServiceWorker/pull/1678. --- fetch.bs | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/fetch.bs b/fetch.bs index e6242f61c..e8a2d201e 100644 --- a/fetch.bs +++ b/fetch.bs @@ -7542,8 +7542,8 @@ object), initially null.

To create a {{Request}} object, given a -request request, headers guard guard, and -realm realm, run these steps: +request request, headers guard guard, +{{AbortSignal}} object signal, and realm realm:

  1. Let requestObject be a new {{Request}} object with realm. @@ -7554,8 +7554,7 @@ object), initially null. object with realm, whose headers list is request's headers list and guard is guard. -

  2. Set requestObject's signal to a new - {{AbortSignal}} object with realm. +

  3. Set requestObject's signal to signal.

  4. Return requestObject.

@@ -7826,11 +7825,12 @@ constructor steps are:
  • Set this's request to request. -

  • Set this's signal to a new {{AbortSignal}} object - with this's relevant realm. +

  • Let signals be « signal » if signal is non-null; otherwise + « ». -

  • If signal is non-null, then make this's signal - follow signal. +

  • Set this's signal to the result of + creating a dependent abort signal from signals, using {{AbortSignal}} and + this's relevant realm.

  • Set this's headers to a new {{Headers}} object with this's relevant realm, whose header list is request's @@ -8015,12 +8015,15 @@ set; otherwise false.

  • Let clonedRequest be the result of cloning this's request. -

  • Let clonedRequestObject be the result of creating a - {{Request}} object, given clonedRequest, this's - headers's guard, and this's relevant realm. +

  • Assert: this's signal is non-null. -

  • Make clonedRequestObject's signal - follow this's signal. +

  • Let clonedSignal be the result of creating a dependent abort signal from + « this's signal », using {{AbortSignal}} and this's + relevant realm. + +

  • Let clonedRequestObject be the result of creating a + {{Request}} object, given clonedRequest, this's headers's + guard, clonedSignal and this's relevant realm.

  • Return clonedRequestObject.