WebMCP: bridge streamed executeTool() inputs across worlds [chromium/src : main]

0 views
Skip to first unread message

Alex Nahas (Gerrit)

unread,
Mar 10, 2026, 10:21:53 PM (2 days ago) Mar 10
to Raphael Kubo da Costa, Khushal Sagar, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, mfoltz+wa...@chromium.org, jmedle...@chromium.org, aleventh...@chromium.org, blink-re...@chromium.org, mfoltz+wa...@chromium.org, blink-...@chromium.org, ipc-securi...@chromium.org

Alex Nahas has uploaded the change for review

Commit message

WebMCP: bridge streamed executeTool() inputs across worlds

This CL fixes the cross-world streamed executeTool() path.

The streamed testing overload can receive chunks and args in one
ScriptState and invoke the tool in another. Before this change, the
caller-world ReadableStream, args promise, and pre-abort reason could
reach the tool callback world directly. This CL bridges those values into
the callback-relevant ScriptState before StreamedToolCall or PromiseAll
sees them.

Same-world execution stays on the existing fast path. Declarative tools
and the non-streamed string path are unchanged.
Change-Id: I2a3bd5d5730aa311624e02589b511887a568aecf

Change diff


Change information

Files:
  • M third_party/blink/renderer/core/script_tools/model_context.cc
  • M third_party/blink/renderer/core/script_tools/model_context.h
  • M third_party/blink/renderer/core/script_tools/model_context_test.cc
  • M third_party/blink/renderer/core/script_tools/model_context_testing.cc
  • M third_party/blink/web_tests/fast/webmcp/streaming_tools-expected.txt
  • M third_party/blink/web_tests/fast/webmcp/streaming_tools.html
Change size: XL
Delta: 6 files changed, 1066 insertions(+), 86 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2a3bd5d5730aa311624e02589b511887a568aecf
Gerrit-Change-Number: 7654585
Gerrit-PatchSet: 1
Gerrit-Owner: Alex Nahas <alexm...@gmail.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Khushal Sagar <khusha...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Nahas (Gerrit)

unread,
Mar 10, 2026, 11:59:39 PM (2 days ago) Mar 10
to chromium...@chromium.org, Kentaro Hara, Khushal Sagar, Raphael Kubo da Costa, aleventh...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, ipc-securi...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, mfoltz+wa...@chromium.org, mfoltz+wa...@chromium.org

Alex Nahas abandoned this change.

View Change

Abandoned Superseded by the smaller 5-CL restack that splits the cross-world work into separate value-bridging and stream-relay CLs.

Alex Nahas abandoned this change

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: abandon
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I2a3bd5d5730aa311624e02589b511887a568aecf
Gerrit-Change-Number: 7654585
Gerrit-PatchSet: 2
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages