This includes AbortController & AbortSignal https://dom.spec.whatwg.org/#aborting-ongoing-activities. Fetch abort tests are at https://github.com/w3c/web-platform-tests/pull/6484. Fetch abort spec is in progress https://github.com/whatwg/fetch/pull/523. Mozilla intends to start implementing next month, using the tests rather than the spec.
Is there a roadmap for these features? I cannot find them in Webkit Status, and Firefox and Chrome already have support for aborts.
It's a strange that: * caniuse.com claims that Safari supports AbortController * window.AbortController is defined in Safari ...but a simple testcase like this: http://temp.minimum.se/abort-native.html Shows that Safari 12.0.1 sends the request even if controller.abort() has been called, i.e. only some "placeholder AbortController" has been added in Safari. It is not working at all.
I confirm what molsson mentioned. The abort on fetch request on Safari 12.0.1 doesn't work at all.
This is really sad that only Webkit is missing Abortable Fetch since April 2018
<rdar://problem/46861402>
Created attachment 357950 [details] Patch
Created attachment 357951 [details] Patch
Created attachment 357952 [details] Patch
Created attachment 357959 [details] Patch
Comment on attachment 357959 [details] Patch Attachment 357959 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10509229 New failing tests: imported/w3c/web-platform-tests/fetch/api/abort/general-serviceworker.https.html
Created attachment 357966 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 358267 [details] Patch
Comment on attachment 358267 [details] Patch Attachment 358267 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10621118 New failing tests: imported/w3c/web-platform-tests/fetch/api/abort/general-serviceworker.https.html
Created attachment 358291 [details] Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 358267 [details] Patch Failing test is due to SSL connection issue which seems to happen on iOS in some cases. This does not seem related with the changes but may make the above test flaky on iOS.
Comment on attachment 358267 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=358267&action=review > Source/WebCore/Modules/fetch/FetchBodyOwner.h:130 > + struct LoadingError { Can you really have both a ResourceError and an exception at the same time. If not, could we use a Variant instead?
(In reply to Chris Dumez from comment #16) > Comment on attachment 358267 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=358267&action=review > > > Source/WebCore/Modules/fetch/FetchBodyOwner.h:130 > > + struct LoadingError { > > Can you really have both a ResourceError and an exception at the same time. > If not, could we use a Variant instead? I hesitated on this one. I think we can only have one. I went with a struct instead of a Variant as I thought it makes the accessors to resource error/exception simpler and easier to use. I'll do the Variant experiment.
Created attachment 358340 [details] Patch for landing
Created attachment 358342 [details] Patch for landing
(In reply to youenn fablet from comment #19) > Created attachment 358342 [details] > Patch for landing With Variant
Comment on attachment 358342 [details] Patch for landing Attachment 358342 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10631023 New failing tests: imported/w3c/web-platform-tests/fetch/api/abort/general-serviceworker.https.html
Created attachment 358354 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 358374 [details] Patch for landing
(In reply to youenn fablet from comment #23) > Created attachment 358374 [details] > Patch for landing Marking imported/w3c/web-platform-tests/fetch/api/abort/general-serviceworker.https.html as flaky on iOS
The commit-queue encountered the following flaky tests while processing attachment 358374 [details]: fetch/fetch-worker-crash.html bug 187257 (author: youennf@gmail.com) The commit-queue is continuing to process your patch.
The commit-queue encountered the following flaky tests while processing attachment 358374 [details]: http/wpt/css/css-animations/start-animation-001.html bug 190903 (authors: dino@apple.com, fred.wang@free.fr, and graouts@apple.com) The commit-queue is continuing to process your patch.
Comment on attachment 358374 [details] Patch for landing Clearing flags on attachment: 358374 Committed r239644: <https://trac.webkit.org/changeset/239644>
All reviewed patches have been landed. Closing bug.