mirror of
https://github.com/servo/servo.git
synced 2025-09-19 19:30:10 +01:00
Add signal to request (#39290)
The signal taken from the requestinit is now passed into the request object with the relevant steps. I added all spec comments to this method, as I had trouble figuring out which steps I had to add. This required implementing the algorithm to create dependent signals, which is used in the `any()` method. So that's now implemented as well. All of that required the machinery to have dependent and source signals on an AbortSignal. It uses an IndexSet as the spec requires it to be an ordered set. Part of #34866 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
parent
1898a740a8
commit
22fbb3458b
11 changed files with 278 additions and 266 deletions
|
@ -1,2 +0,0 @@
|
|||
[abort-signal-any-crash.html]
|
||||
expected: TIMEOUT
|
|
@ -1,86 +1,8 @@
|
|||
[abort-signal-any.any.worker.html]
|
||||
[AbortSignal.any() works with an empty array of signals]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() follows a single signal (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() follows multiple signals (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() returns an aborted signal if passed an aborted signal (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() can be passed the same signal more than once (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() uses the first instance of a duplicate signal (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() signals are composable (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() works with signals returned by AbortSignal.timeout() (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() works with intermediate signals (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[Abort events for AbortSignal.any() signals fire in the right order (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[Dependent signals for AbortSignal.any() are marked aborted before abort events fire (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[Dependent signals for AbortSignal.any() are aborted correctly for reentrant aborts (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[Dependent signals for AbortSignal.any() should use the same DOMException instance from the already aborted source signal (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[Dependent signals for AbortSignal.any() should use the same DOMException instance from the source signal being aborted later (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[abort-signal-any.any.html]
|
||||
[AbortSignal.any() works with an empty array of signals]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() follows a single signal (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() follows multiple signals (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() returns an aborted signal if passed an aborted signal (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() can be passed the same signal more than once (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() uses the first instance of a duplicate signal (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() signals are composable (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() works with signals returned by AbortSignal.timeout() (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal.any() works with intermediate signals (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[Abort events for AbortSignal.any() signals fire in the right order (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[Dependent signals for AbortSignal.any() are marked aborted before abort events fire (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[Dependent signals for AbortSignal.any() are aborted correctly for reentrant aborts (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[Dependent signals for AbortSignal.any() should use the same DOMException instance from the already aborted source signal (using AbortController)]
|
||||
expected: FAIL
|
||||
|
||||
[Dependent signals for AbortSignal.any() should use the same DOMException instance from the source signal being aborted later (using AbortController)]
|
||||
expected: FAIL
|
||||
|
|
36
tests/wpt/meta/dom/idlharness.any.js.ini
vendored
36
tests/wpt/meta/dom/idlharness.any.js.ini
vendored
|
@ -17,33 +17,9 @@
|
|||
[AbortController interface: new AbortController() must inherit property "abort()" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: existence and properties of interface prototype object's @@unscopables property]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: operation abort()]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: attribute aborted]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: attribute onabort]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal must be primary interface of new AbortController().signal]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -77,15 +53,6 @@
|
|||
[EventTarget interface: calling dispatchEvent(Event) on new AbortController().signal with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: operation abort(optional any)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: attribute reason]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: operation throwIfAborted()]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: new AbortController().signal must inherit property "abort(optional any)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -107,9 +74,6 @@
|
|||
[AbortSignal interface: calling timeout(unsigned long long) on new AbortController().signal with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: operation any(sequence<AbortSignal>)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: new AbortController().signal must inherit property "any(sequence<AbortSignal>)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
|
39
tests/wpt/meta/dom/idlharness.window.js.ini
vendored
39
tests/wpt/meta/dom/idlharness.window.js.ini
vendored
|
@ -2,12 +2,6 @@
|
|||
[AbortSignal must be primary interface of new AbortController().signal]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: existence and properties of interface prototype object's @@unscopables property]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[EventTarget interface: calling removeEventListener(DOMString, EventListener?, optional (EventListenerOptions or boolean)) on new AbortController().signal with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -17,9 +11,6 @@
|
|||
[EventTarget interface: new AbortController().signal must inherit property "dispatchEvent(Event)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[EventTarget interface: new AbortController().signal must inherit property "removeEventListener(DOMString, EventListener?, optional (EventListenerOptions or boolean))" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -29,9 +20,6 @@
|
|||
[AbortController interface: attribute signal]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: attribute aborted]
|
||||
expected: FAIL
|
||||
|
||||
[AbortController interface: new AbortController() must inherit property "signal" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -47,21 +35,9 @@
|
|||
[EventTarget interface: calling addEventListener(DOMString, EventListener?, optional (AddEventListenerOptions or boolean)) on new AbortController().signal with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: new AbortController().signal must inherit property "onabort" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: attribute onabort]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[NodeFilter interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -173,15 +149,6 @@
|
|||
[XSLTProcessor interface: new XSLTProcessor() must inherit property "reset()" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: operation abort(optional any)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: attribute reason]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: operation throwIfAborted()]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: new AbortController().signal must inherit property "abort(optional any)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -227,9 +194,6 @@
|
|||
[Element interface: element must inherit property "onfullscreenerror" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: operation any(sequence<AbortSignal>)]
|
||||
expected: FAIL
|
||||
|
||||
[AbortSignal interface: new AbortController().signal must inherit property "any(sequence<AbortSignal>)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -373,3 +337,6 @@
|
|||
|
||||
[Element interface: element must inherit property "customElementRegistry" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[idlharness.window.html?include=Node]
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
[Aborting rejects with AbortError - no-cors]
|
||||
expected: FAIL
|
||||
|
||||
[Request objects have a signal property]
|
||||
expected: FAIL
|
||||
|
||||
[Signal on request object]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -96,12 +93,6 @@
|
|||
[Readable stream synchronously cancels with AbortError if aborted before reading]
|
||||
expected: NOTRUN
|
||||
|
||||
[Signal state is cloned]
|
||||
expected: FAIL
|
||||
|
||||
[Clone aborts with original controller]
|
||||
expected: FAIL
|
||||
|
||||
[Aborting rejects with abort reason]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -123,9 +114,6 @@
|
|||
[Aborting rejects with AbortError - no-cors]
|
||||
expected: FAIL
|
||||
|
||||
[Request objects have a signal property]
|
||||
expected: FAIL
|
||||
|
||||
[Signal on request object]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -207,12 +195,6 @@
|
|||
[Readable stream synchronously cancels with AbortError if aborted before reading]
|
||||
expected: NOTRUN
|
||||
|
||||
[Signal state is cloned]
|
||||
expected: FAIL
|
||||
|
||||
[Clone aborts with original controller]
|
||||
expected: FAIL
|
||||
|
||||
[Aborting rejects with abort reason]
|
||||
expected: FAIL
|
||||
|
||||
|
|
12
tests/wpt/meta/fetch/api/idlharness.any.js.ini
vendored
12
tests/wpt/meta/fetch/api/idlharness.any.js.ini
vendored
|
@ -8,9 +8,6 @@
|
|||
[Request interface: attribute isHistoryNavigation]
|
||||
expected: FAIL
|
||||
|
||||
[Request interface: attribute signal]
|
||||
expected: FAIL
|
||||
|
||||
[Request interface: attribute duplex]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -23,9 +20,6 @@
|
|||
[Request interface: new Request('about:blank') must inherit property "isHistoryNavigation" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Request interface: new Request('about:blank') must inherit property "signal" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Request interface: new Request('about:blank') must inherit property "duplex" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -43,9 +37,6 @@
|
|||
[Request interface: attribute isHistoryNavigation]
|
||||
expected: FAIL
|
||||
|
||||
[Request interface: attribute signal]
|
||||
expected: FAIL
|
||||
|
||||
[Request interface: attribute duplex]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -58,9 +49,6 @@
|
|||
[Request interface: new Request('about:blank') must inherit property "isHistoryNavigation" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Request interface: new Request('about:blank') must inherit property "signal" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[Request interface: new Request('about:blank') must inherit property "duplex" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue