Skip to content

Track each waitForToolsUntil() call separately - #400

Merged
khushalsagar merged 2 commits into
mainfrom
wait-for-tools-until-per-call
Dec 1, 2026
Merged

khushalsagar merged 2 commits into
mainfrom
wait-for-tools-until-per-call

Conversation

@khushalsagar

@khushalsagar khushalsagar commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Aligning with the implementation at crrev/c/8839362.


Preview | Diff

Replace the set of pending tool readiness promises with a count of
pending waitForToolsUntil() calls. Each call stops keeping the Document
not ready when its promise settles or when its own timeout expires,
whichever happens first, so passing the same promise twice counts as
two calls, like ExtendableEvent.waitUntil().

@beaufortfrancois beaufortfrancois left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo nits:

  1. The Chromium link points to the internal chromium-review.git.corp.google.com host. Could you switch it to the public URL: https://chromium-review.googlesource.com/c/chromium/src/+/8839362
  2. Would be good to have WPT coverage for the per-call behavior.

Comment thread index.bs Resolved
Comment thread index.bs Resolved
Comment thread index.bs Resolved
@khushalsagar

Copy link
Copy Markdown
Collaborator Author

Would be good to have WPT coverage for the per-call behavior.

There's no web API to read the ready state right now so no way to check this in a WPT. It'll be possible once we add the toolChange event for this state, we can add a WPT then.

@khushalsagar
khushalsagar merged commit f23f4c2 into main Dec 1, 2026
2 checks passed
@khushalsagar
khushalsagar deleted the wait-for-tools-until-per-call branch December 1, 2026 19:23
github-actions Bot added a commit that referenced this pull request Dec 1, 2026
SHA: f23f4c2
Reason: push, by khushalsagar

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants