Pass FrameToken from MainThreadDebugger::consoleAPIMessage down to WebContentsDelegate::DidAddMessageToConsole and WebContentsObserver::OnDidAddMessageToConsole. [chromium/src : main]

0 views
Skip to first unread message

Tomasz Malinowski (Gerrit)

unread,
Oct 8, 2025, 6:40:17 AMOct 8
to Alex Rudenko, Alex Moshchuk, chromium...@chromium.org, Kentaro Hara, Nate Chapin, Raphael Kubo da Costa, Kevin McNee, Peter Beverloo, James Maclean, Zijie He, alexmo...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chromeos-kio...@google.com, chromium-a...@chromium.org, creis...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, fuchsia...@chromium.org, gavinp...@chromium.org, headless...@chromium.org, ipc-securi...@chromium.org, jimmyxgong+w...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loading...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, michaelcheco+...@google.com, navigation...@chromium.org, oshima...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
Attention needed from Alex Moshchuk and Alex Rudenko

Tomasz Malinowski added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Tomasz Malinowski . resolved

This is proposal to pass information about frame which send log (FrameToken) from MainThreadDebugger::consoleAPIMessage down to WebContentsDelegate::DidAddMessageToConsole and WebContentsObserver::OnDidAddMessageToConsole.

It is result of change in V8:
V8 changes - https://chromium-review.googlesource.com/c/v8/v8/+/6811579
V8 ticket - https://issues.chromium.org/u/1/issues/437026560

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Moshchuk
  • Alex Rudenko
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: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I3b570a6c7c38f7ea4520e09ecb5cfc7c2d992698
Gerrit-Change-Number: 7019174
Gerrit-PatchSet: 1
Gerrit-Owner: Tomasz Malinowski <tomasz.cr...@gmail.com>
Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-CC: James Maclean <wjma...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Kevin McNee <mc...@chromium.org>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: Peter Beverloo <pe...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-CC: Zijie He <zij...@google.com>
Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
Gerrit-Comment-Date: Wed, 08 Oct 2025 10:39:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Moshchuk (Gerrit)

unread,
Oct 9, 2025, 8:05:28 PMOct 9
to Tomasz Malinowski, Alex Rudenko, chromium...@chromium.org, Kentaro Hara, Nate Chapin, Raphael Kubo da Costa, Kevin McNee, Peter Beverloo, James Maclean, Zijie He, alexmo...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chromeos-kio...@google.com, chromium-a...@chromium.org, creis...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, fuchsia...@chromium.org, gavinp...@chromium.org, headless...@chromium.org, ipc-securi...@chromium.org, jimmyxgong+w...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loading...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, michaelcheco+...@google.com, navigation...@chromium.org, oshima...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
Attention needed from Alex Rudenko and Tomasz Malinowski

Alex Moshchuk added 2 comments

Patchset-level comments
Alex Moshchuk . resolved

Thanks for the CL. I'm curious to hear alexrudenko@'s thoughts on whether this is needed from a devtools perspective, and in the meantime a couple of comments from a content owner perspective.

File content/public/browser/web_contents_observer.h
Line 851, Patchset 1 (Latest): const std::optional<std::u16string>& source_frame_token) {}
Alex Moshchuk . unresolved

How is this going to be used outside of //content? I don't see any uses of this, only the plumbing to make it available, but this goes against the guidelines for introducing content/public APIs, where each addition must be accompanied by code that uses it outside of //content (https://chromium.googlesource.com/chromium/src/+/HEAD/content/public/README.md).

The other concern I have with this is that the `source_frame_token` seems to come from the (possibly compromised) renderer, so we need to be careful with how it's going to be used, and possibly validate that it corresponds to a valid frame prior to plumbing it for use outside //content. What kind of token is this? For example, LocalFrameTokens can't be resolved to frames without a valid process ID (https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/render_frame_host_impl.h;l=358-365;drc=62a9a00176f862e688fa47919ed6f19b59f77b5f).

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Rudenko
  • Tomasz Malinowski
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: I3b570a6c7c38f7ea4520e09ecb5cfc7c2d992698
    Gerrit-Change-Number: 7019174
    Gerrit-PatchSet: 1
    Gerrit-Owner: Tomasz Malinowski <tomasz.cr...@gmail.com>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-CC: James Maclean <wjma...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Kevin McNee <mc...@chromium.org>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: Peter Beverloo <pe...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-CC: Zijie He <zij...@google.com>
    Gerrit-Attention: Tomasz Malinowski <tomasz.cr...@gmail.com>
    Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Comment-Date: Fri, 10 Oct 2025 00:05:04 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alex Rudenko (Gerrit)

    unread,
    Oct 10, 2025, 2:55:17 AMOct 10
    to Tomasz Malinowski, Simon Zünd, Alex Moshchuk, chromium...@chromium.org, Kentaro Hara, Nate Chapin, Raphael Kubo da Costa, Kevin McNee, Peter Beverloo, James Maclean, Zijie He, alexmo...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chromeos-kio...@google.com, chromium-a...@chromium.org, creis...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, fuchsia...@chromium.org, gavinp...@chromium.org, headless...@chromium.org, ipc-securi...@chromium.org, jimmyxgong+w...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loading...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, michaelcheco+...@google.com, navigation...@chromium.org, oshima...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Simon Zünd and Tomasz Malinowski

    Alex Rudenko added 2 comments

    Patchset-level comments
    Alex Rudenko . unresolved

    @szu...@chromium.org could you please review? I saw you reviewed corresponding v8 changes.

    File third_party/blink/renderer/core/inspector/main_thread_debugger.cc
    Line 403, Patchset 1 (Latest): frame->Console().ReportMessageToClient(
    Alex Rudenko . unresolved

    is not `frame` already referring to the source frame?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Simon Zünd
    • Tomasz Malinowski
    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: I3b570a6c7c38f7ea4520e09ecb5cfc7c2d992698
    Gerrit-Change-Number: 7019174
    Gerrit-PatchSet: 1
    Gerrit-Owner: Tomasz Malinowski <tomasz.cr...@gmail.com>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Simon Zünd <szu...@chromium.org>
    Gerrit-CC: James Maclean <wjma...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Kevin McNee <mc...@chromium.org>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: Peter Beverloo <pe...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-CC: Zijie He <zij...@google.com>
    Gerrit-Attention: Tomasz Malinowski <tomasz.cr...@gmail.com>
    Gerrit-Attention: Simon Zünd <szu...@chromium.org>
    Gerrit-Comment-Date: Fri, 10 Oct 2025 06:54:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Simon Zünd (Gerrit)

    unread,
    Oct 10, 2025, 3:22:53 AMOct 10
    to Tomasz Malinowski, Chromium LUCI CQ, Alex Rudenko, Alex Moshchuk, chromium...@chromium.org, Kentaro Hara, Nate Chapin, Raphael Kubo da Costa, Kevin McNee, Peter Beverloo, James Maclean, Zijie He, alexmo...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chromeos-kio...@google.com, chromium-a...@chromium.org, creis...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, fuchsia...@chromium.org, gavinp...@chromium.org, headless...@chromium.org, ipc-securi...@chromium.org, jimmyxgong+w...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loading...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, michaelcheco+...@google.com, navigation...@chromium.org, oshima...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Alex Rudenko and Tomasz Malinowski

    Simon Zünd added 2 comments

    Patchset-level comments
    Simon Zünd . unresolved

    The V8 change in and of itself was fine. Whether or not it's ok to pass up the frame token through all layers of abstraction (also w.r.t. to security) I'm not able to judge so I'll defer to Chromium owners here.

    One thing to note thats not clear from the CL description: IIUC the frame token will not actually be used anywhere in Chrome/Chromium, but it's a third party browser that implements a custom `WebContentsDelegate`.

    File third_party/blink/renderer/core/inspector/main_thread_debugger.cc
    Line 403, Patchset 1 (Latest): frame->Console().ReportMessageToClient(
    Alex Rudenko . unresolved

    is not `frame` already referring to the source frame?

    Simon Zünd

    For same origin iframes, `frame` and `local_frame` will differ.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Rudenko
    • Tomasz Malinowski
    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: I3b570a6c7c38f7ea4520e09ecb5cfc7c2d992698
    Gerrit-Change-Number: 7019174
    Gerrit-PatchSet: 1
    Gerrit-Owner: Tomasz Malinowski <tomasz.cr...@gmail.com>
    Gerrit-Reviewer: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Simon Zünd <szu...@chromium.org>
    Gerrit-CC: James Maclean <wjma...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Kevin McNee <mc...@chromium.org>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: Peter Beverloo <pe...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-CC: Zijie He <zij...@google.com>
    Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Attention: Tomasz Malinowski <tomasz.cr...@gmail.com>
    Gerrit-Comment-Date: Fri, 10 Oct 2025 07:22:04 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alex Rudenko <alexr...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alex Moshchuk (Gerrit)

    unread,
    Oct 10, 2025, 2:42:06 PMOct 10
    to Tomasz Malinowski, Chromium LUCI CQ, Alex Rudenko, Simon Zünd, chromium...@chromium.org, Kentaro Hara, Nate Chapin, Raphael Kubo da Costa, Kevin McNee, Peter Beverloo, James Maclean, Zijie He, alexmo...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chromeos-kio...@google.com, chromium-a...@chromium.org, creis...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, fuchsia...@chromium.org, gavinp...@chromium.org, headless...@chromium.org, ipc-securi...@chromium.org, jimmyxgong+w...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loading...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, michaelcheco+...@google.com, navigation...@chromium.org, oshima...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Alex Rudenko and Tomasz Malinowski

    Alex Moshchuk added 1 comment

    Patchset-level comments
    Simon Zünd . unresolved

    The V8 change in and of itself was fine. Whether or not it's ok to pass up the frame token through all layers of abstraction (also w.r.t. to security) I'm not able to judge so I'll defer to Chromium owners here.

    One thing to note thats not clear from the CL description: IIUC the frame token will not actually be used anywhere in Chrome/Chromium, but it's a third party browser that implements a custom `WebContentsDelegate`.

    Alex Moshchuk

    If this is the case, this unfortunately goes against our guidelines for accepting this code change: see https://chromium.googlesource.com/chromium/src/+/main/docs/contributing.md#code-guidelines under "Code in the Chromium project should be in service of other code in the Chromium project."

    In similar cases in the past, we only proceeded with a change like this if we also found a valid use case in the codebase which meaningfully benefits Chromium.

    Gerrit-Comment-Date: Fri, 10 Oct 2025 18:41:41 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Simon Zünd <szu...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Tomasz Malinowski (Gerrit)

    unread,
    Nov 19, 2025, 6:27:42 AM (4 days ago) Nov 19
    to Chromium LUCI CQ, Alex Rudenko, Simon Zünd, Alex Moshchuk, chromium...@chromium.org, Kentaro Hara, Nate Chapin, Raphael Kubo da Costa, Kevin McNee, Peter Beverloo, James Maclean, Zijie He, alexmo...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chromeos-kio...@google.com, chromium-a...@chromium.org, creis...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, fuchsia...@chromium.org, gavinp...@chromium.org, headless...@chromium.org, ipc-securi...@chromium.org, jimmyxgong+w...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loading...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, michaelcheco+...@google.com, navigation...@chromium.org, oshima...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Alex Moshchuk

    Tomasz Malinowski added 1 comment

    File content/public/browser/web_contents_observer.h
    Line 851, Patchset 1 (Latest): const std::optional<std::u16string>& source_frame_token) {}
    Alex Moshchuk . unresolved

    How is this going to be used outside of //content? I don't see any uses of this, only the plumbing to make it available, but this goes against the guidelines for introducing content/public APIs, where each addition must be accompanied by code that uses it outside of //content (https://chromium.googlesource.com/chromium/src/+/HEAD/content/public/README.md).

    The other concern I have with this is that the `source_frame_token` seems to come from the (possibly compromised) renderer, so we need to be careful with how it's going to be used, and possibly validate that it corresponds to a valid frame prior to plumbing it for use outside //content. What kind of token is this? For example, LocalFrameTokens can't be resolved to frames without a valid process ID (https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/render_frame_host_impl.h;l=358-365;drc=62a9a00176f862e688fa47919ed6f19b59f77b5f).

    Tomasz Malinowski

    Q: How is this going to be used outside of //content?
    A: It will be used to get proper RenderFrameHost and get more info about frame which send this log, e.g.: Frame name.

    Q: What kind of token is this? For example, LocalFrameTokens can't be resolved to frames without a valid process ID.
    A: Yes, you have right, That is why I plan to replace const std::optional<std::u16string>& source_frame_token to const std::optional<content::GlobalRenderFrameHostToken>& source_frame_global_token. This will resolve problem of finding correct frame on browser process side.

    My questions:
    About this policy: https://chromium.googlesource.com/chromium/src/+/HEAD/content/public/README.md
    If I will not go outside //content , then it will be accepted to have it integrated in to chromium ? I was thinking to pass source_frame_global_token only down to RenderFrameHostDelegate.
    Also I was inspired by const std::optional<std::u16string>& untrusted_stack_trace which is passed everywhere but used only it two places and mostly only in dev logs.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Moshchuk
    Gerrit-Attention: Alex Moshchuk <ale...@chromium.org>
    Gerrit-Comment-Date: Wed, 19 Nov 2025 11:27:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alex Moshchuk <ale...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Raymund Ico

    unread,
    Nov 19, 2025, 8:57:48 AM (3 days ago) Nov 19
    to devtools...@chromium.org, Chromium LUCI CQ, Alex Rudenko, Simon Zünd, Alex Moshchuk, chromium...@chromium.org, Kentaro Hara, Nate Chapin, Raphael Kubo da Costa, Kevin McNee, Peter Beverloo, James Maclean, Zijie He, alexmo...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-revi...@chromium.org, blink-...@chromium.org, chromeos-kio...@google.com, chromium-a...@chromium.org, creis...@chromium.org, devtools-re...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, extension...@chromium.org, fuchsia...@chromium.org, gavinp...@chromium.org, headless...@chromium.org, ipc-securi...@chromium.org, jimmyxgong+w...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loading...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, michaelcheco+...@google.com, navigation...@chromium.org, oshima...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    F.Y.I
    The Gerrit API-to-Go with its multi cast capabilities has an embedded Super AI all of AI models are inside to protect the Gerrit REST API Now if you trying to configure or any sort of reprogram without proper coding this result the AI getting super charge they protect their territory as well 

    To unsubscribe from this group and stop receiving emails from it, send an email to devtools-revie...@chromium.org.
    1000021197.jpg
    open
    unsatisfied_requirement
    unsatisfied_requirement
    open
    1000021196.jpg
    1000020391.jpg
    1000020396.jpg
    1000020430.png
    diffy
    unsatisfied_requirement
    unsatisfied_requirement
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages