Forwarding abort reason from AbortController.abort() to fetch() promise [chromium/src : main]

0 views
Skip to first unread message

Taylor Brandstetter (Gerrit)

unread,
May 12, 2026, 1:34:29 AM (7 days ago) May 12
to Taylor Brandstetter, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, Hiroki Nakagawa, blink-revie...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, horo+...@chromium.org, jmedle...@chromium.org, kinuko+ser...@chromium.org, kinuko...@chromium.org, servicewor...@chromium.org, shimazu+se...@chromium.org, storage...@chromium.org
Attention needed from Taylor Brandstetter

Taylor Brandstetter added 2 comments

Patchset-level comments
File-level comment, Patchset 1:
Taylor Brandstetter . unresolved

I'm doing this following a discussion with Adam. The context is that we (Meet developers) would like the stack information that CreateOrEmpty provides, so we were thinking of just changing body.cc to use that, and preferably adding the fetch URL in the message as well for additional debuggability.

That would require an experiment for changing the message. But Adam also noticed that we should be providing the abort reason as well (if one is provided), which also would require an experiment. In which case we might as well do both at once.

A question though: What would be the best way to go about getting the URL into this message, assuming that's not problematic? The error is now coming from AbortSignal (https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/dom/abort_signal.cc;l=279;drc=0a4317210c4de343411da25ccf8145d3091b3007) which doesn't have that context. Could I provide an optional string to its constructor for a default abort reason? Or would the memory footprint for that be a concern?

File third_party/blink/web_tests/external/wpt/fetch/api/abort/general.any.js
Line 54, Patchset 2: await promise_rejects_exactly(t, error1, fetchPromise, 'fetch() should reject with abort reason when aborted after fetch() called');
Taylor Brandstetter . resolved

This was already working but I added a test for it for good measure.

Open in Gerrit

Related details

Attention is currently required from:
  • Taylor Brandstetter
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iea6190f533c4b87326671e0d40f7accadde0abb8
Gerrit-Change-Number: 7759798
Gerrit-PatchSet: 3
Gerrit-Owner: Taylor Brandstetter <dead...@chromium.org>
Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-CC: Taylor Brandstetter <dead...@google.com>
Gerrit-Attention: Taylor Brandstetter <dead...@chromium.org>
Gerrit-Comment-Date: Tue, 12 May 2026 05:34:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages