[persistent_cache] Support source-keyed code cache on browser process [chromium/src : main]

0 views
Skip to first unread message

Takashi Nakayama (Gerrit)

unread,
Mar 1, 2026, 11:07:59 PM (11 days ago) Mar 1
to Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Chromium IPC Reviews, Rakina Zata Amni, Christian Dullweber, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
Attention needed from Christian Dullweber, Chromium IPC Reviews, Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski and Rakina Zata Amni

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Christian Dullweber
  • Chromium IPC Reviews
  • Greg Thompson
  • Hiroshige Hayashizaki
  • Kouhei Ueno
  • Leszek Swirski
  • Rakina Zata Amni
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: Iee5da70138cd0d1130b442d9edd8f9299577dbf4
Gerrit-Change-Number: 7615151
Gerrit-PatchSet: 6
Gerrit-Owner: Takashi Nakayama <tn...@chromium.org>
Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
Gerrit-Reviewer: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-Reviewer: Greg Thompson <g...@chromium.org>
Gerrit-Reviewer: Hiroshige Hayashizaki <hiro...@chromium.org>
Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
Gerrit-Attention: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
Gerrit-Attention: Greg Thompson <g...@chromium.org>
Gerrit-Attention: Christian Dullweber <dull...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Comment-Date: Mon, 02 Mar 2026 04:07:23 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

gwsq (Gerrit)

unread,
Mar 1, 2026, 11:10:53 PM (11 days ago) Mar 1
to Takashi Nakayama, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, Christian Dullweber, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
Attention needed from Christian Dullweber, Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Toyoshima

Message from gwsq

From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
IPC: toyo...@chromium.org

📎 It looks like you’re making a possibly security-sensitive change! 📎 IPC security review isn’t a rubberstamp, so your friendly security reviewer will need a fair amount of context to review your CL effectively. Please review your CL description and code comments to make sure they provide context for someone unfamiliar with your project/area. Pay special attention to where data comes from and which processes it flows between (and their privilege levels). Feel free to point your security reviewer at design docs, bugs, or other links if you can’t reasonably make a self-contained CL description. (Also see https://cbea.ms/git-commit/).

IPC reviewer(s): toyo...@chromium.org


Reviewer source(s):
toyo...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)

Open in Gerrit

Related details

Attention is currently required from:
  • Christian Dullweber
  • Greg Thompson
  • Hiroshige Hayashizaki
  • Kouhei Ueno
  • Leszek Swirski
  • Rakina Zata Amni
  • Takashi Toyoshima
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: Iee5da70138cd0d1130b442d9edd8f9299577dbf4
Gerrit-Change-Number: 7615151
Gerrit-PatchSet: 6
Gerrit-Owner: Takashi Nakayama <tn...@chromium.org>
Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
Gerrit-Reviewer: Greg Thompson <g...@chromium.org>
Gerrit-Reviewer: Hiroshige Hayashizaki <hiro...@chromium.org>
Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-CC: Nate Chapin <jap...@chromium.org>
Gerrit-CC: gwsq
Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
Gerrit-Attention: Greg Thompson <g...@chromium.org>
Gerrit-Attention: Christian Dullweber <dull...@chromium.org>
Gerrit-Attention: Leszek Swirski <les...@chromium.org>
Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Comment-Date: Mon, 02 Mar 2026 04:10:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Takashi Toyoshima (Gerrit)

unread,
Mar 2, 2026, 12:28:04 AM (11 days ago) Mar 2
to Takashi Nakayama, Chromium IPC Reviews, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, Christian Dullweber, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
Attention needed from Christian Dullweber, Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Nakayama

Takashi Toyoshima added 4 comments

File content/browser/renderer_host/code_cache_host_impl.cc
Line 314, Patchset 7: mojo_base::BigBuffer data) override {}
Takashi Toyoshima . unresolved

Can you comment why this does nothing?

Line 378, Patchset 7: mojo_base::BigBuffer data) override {
Takashi Toyoshima . unresolved

Can you comment why this is not permitted (and why disallowed calls could happen)?

Line 575, Patchset 7: CHECK_EQ(source_hash.size(), 32u);
Takashi Toyoshima . unresolved

Can you have a comment that says this CHECK is safe as this vector size is ensured in the mojo binding, as this is declared as array<uint8, 32>.

Line 680, Patchset 7:
Takashi Toyoshima . unresolved

Let's explain what's this magic is, e.g. why this is needed, and why this magic name is fine.
Also, I think it's robust to modify the original GeneratedCodeCache::GetContextKey() so that we can have a single key generator for the ContextKey. Otherwise, this kind of wrapper causes confusion on creating a consistent key for all users in the chromium.
For instance, if we follow the key name rules in the original method, you may use kSeparator (" \n") to append your specific new prefix, or suffix might be recommended?

Open in Gerrit

Related details

Attention is currently required from:
  • Christian Dullweber
  • Greg Thompson
  • Hiroshige Hayashizaki
  • Kouhei Ueno
  • Leszek Swirski
  • Rakina Zata Amni
  • Takashi Nakayama
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: Iee5da70138cd0d1130b442d9edd8f9299577dbf4
    Gerrit-Change-Number: 7615151
    Gerrit-PatchSet: 7
    Gerrit-Owner: Takashi Nakayama <tn...@chromium.org>
    Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
    Gerrit-Reviewer: Greg Thompson <g...@chromium.org>
    Gerrit-Reviewer: Hiroshige Hayashizaki <hiro...@chromium.org>
    Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
    Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
    Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
    Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Attention: Greg Thompson <g...@chromium.org>
    Gerrit-Attention: Christian Dullweber <dull...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Comment-Date: Mon, 02 Mar 2026 05:27:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Takashi Nakayama (Gerrit)

    unread,
    Mar 2, 2026, 3:16:48 AM (11 days ago) Mar 2
    to Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, Christian Dullweber, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
    Attention needed from Christian Dullweber, Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Toyoshima

    Takashi Nakayama added 4 comments

    File content/browser/renderer_host/code_cache_host_impl.cc
    Line 314, Patchset 7: mojo_base::BigBuffer data) override {}
    Takashi Toyoshima . resolved

    Can you comment why this does nothing?

    Takashi Nakayama

    I think we don't have to add any comments here to leave it blank because this is a part of `NoopCodeCacheHost`.

    Line 378, Patchset 7: mojo_base::BigBuffer data) override {
    Takashi Toyoshima . resolved

    Can you comment why this is not permitted (and why disallowed calls could happen)?

    Takashi Nakayama

    Done

    Line 575, Patchset 7: CHECK_EQ(source_hash.size(), 32u);
    Takashi Toyoshima . resolved

    Can you have a comment that says this CHECK is safe as this vector size is ensured in the mojo binding, as this is declared as array<uint8, 32>.

    Takashi Nakayama

    Done

    Takashi Toyoshima . unresolved

    Let's explain what's this magic is, e.g. why this is needed, and why this magic name is fine.
    Also, I think it's robust to modify the original GeneratedCodeCache::GetContextKey() so that we can have a single key generator for the ContextKey. Otherwise, this kind of wrapper causes confusion on creating a consistent key for all users in the chromium.
    For instance, if we follow the key name rules in the original method, you may use kSeparator (" \n") to append your specific new prefix, or suffix might be recommended?

    Takashi Nakayama

    @g...@chromium.org Do you have any insights on the format of `ContextKey`? I'm not completely confident on this topic.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Christian Dullweber
    • Greg Thompson
    • Hiroshige Hayashizaki
    • Kouhei Ueno
    • Leszek Swirski
    • Rakina Zata Amni
    • Takashi Toyoshima
    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: Iee5da70138cd0d1130b442d9edd8f9299577dbf4
    Gerrit-Change-Number: 7615151
    Gerrit-PatchSet: 9
    Gerrit-Owner: Takashi Nakayama <tn...@chromium.org>
    Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
    Gerrit-Reviewer: Greg Thompson <g...@chromium.org>
    Gerrit-Reviewer: Hiroshige Hayashizaki <hiro...@chromium.org>
    Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
    Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
    Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Attention: Greg Thompson <g...@chromium.org>
    Gerrit-Attention: Christian Dullweber <dull...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Comment-Date: Mon, 02 Mar 2026 08:16:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Takashi Toyoshima (Gerrit)

    unread,
    Mar 2, 2026, 4:45:08 AM (11 days ago) Mar 2
    to Takashi Nakayama, Chromium IPC Reviews, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, Christian Dullweber, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
    Attention needed from Christian Dullweber, Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Nakayama

    Takashi Toyoshima added 10 comments

    Commit Message
    Line 25, Patchset 9 (Latest):* Prepend an `_sk_` prefix to source-keyed cache IDs within
    `CodeCacheWithPersistentCacheHost` to ensure proper isolation and prevent collisions.
    * Adds `blink::ComposeSourceKeyedCacheKey()` to `code_cache_util.h` to consistently compute cache keys. This method will also be used by the renderer-side implementation of InlineScriptCache.
    Takashi Toyoshima . unresolved

    maybe reformat is required? (for <80)

    Line 30, Patchset 9 (Latest):https://docs.google.com/document/d/1MeUZFfk5ykGrXZoPrFEPLQt6J9XyJE3wSQOPjuiMBTM/edit?tab=t.0#heading=h.66s3tkt0hly
    Takashi Toyoshima . unresolved

    Can we have a public version that contains the essential design part?

    File content/browser/renderer_host/code_cache_host_impl.cc
    Line 314, Patchset 7: mojo_base::BigBuffer data) override {}
    Takashi Toyoshima . resolved

    Can you comment why this does nothing?

    Takashi Nakayama

    I think we don't have to add any comments here to leave it blank because this is a part of `NoopCodeCacheHost`.

    Takashi Toyoshima

    Ah, I see. I overlooked it.

    Line 583, Patchset 9 (Latest): DCHECK_EQ(source_hash.size(), 32u);
    Takashi Toyoshima . unresolved

    Prefer CHECK over DCHECK if you want to have this check here.
    https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/checks.md

    Line 586, Patchset 9 (Latest): // source-keyed cache do not support WebUI.
    Takashi Toyoshima . unresolved

    But you may still need to check if the caller renderer is locked to a network origin?

    Line 593, Patchset 9 (Latest): std::string resource_key = blink::ComposeSourceKeyedCacheKey(source_hash);
    Takashi Toyoshima . unresolved

    nit: const std::string

    Line 651, Patchset 9 (Latest): std::string resource_key = blink::ComposeSourceKeyedCacheKey(source_hash);
    Takashi Toyoshima . unresolved

    nit: const

    File content/browser/renderer_host/code_cache_host_impl_unittest.cc
    Line 420, Patchset 9 (Latest): std::array<uint8_t, 32> source_hash = {
    1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
    17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
    Takashi Toyoshima . unresolved

    can we use an actual sha256(data_str) here rather than a crafted magic numbers?

    Line 723, Patchset 9 (Latest): std::array<uint8_t, 32> source_hash = {
    1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
    17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
    Takashi Toyoshima . unresolved

    ditto

    Line 773, Patchset 9 (Latest): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
    17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
    Takashi Toyoshima . unresolved

    ditto

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Christian Dullweber
    • Greg Thompson
    • Hiroshige Hayashizaki
    • Kouhei Ueno
    • Leszek Swirski
    • Rakina Zata Amni
    • Takashi Nakayama
    Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
    Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
    Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Attention: Greg Thompson <g...@chromium.org>
    Gerrit-Attention: Christian Dullweber <dull...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Comment-Date: Mon, 02 Mar 2026 09:45:03 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
    Comment-In-Reply-To: Takashi Nakayama <tn...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Greg Thompson (Gerrit)

    unread,
    Mar 2, 2026, 5:59:39 AM (11 days ago) Mar 2
    to Takashi Nakayama, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Rakina Zata Amni, Christian Dullweber, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
    Attention needed from Christian Dullweber, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Nakayama

    Greg Thompson added 6 comments

    Commit Message
    Line 25, Patchset 9 (Latest):* Prepend an `_sk_` prefix to source-keyed cache IDs within
    `CodeCacheWithPersistentCacheHost` to ensure proper isolation and prevent collisions.
    * Adds `blink::ComposeSourceKeyedCacheKey()` to `code_cache_util.h` to consistently compute cache keys. This method will also be used by the renderer-side implementation of InlineScriptCache.
    Takashi Toyoshima . unresolved

    maybe reformat is required? (for <80)

    File content/browser/renderer_host/code_cache_host_impl.cc
    Line 583, Patchset 9 (Latest): DCHECK_EQ(source_hash.size(), 32u);
    Takashi Toyoshima . unresolved

    Prefer CHECK over DCHECK if you want to have this check here.
    https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/checks.md

    Greg Thompson

    I think it's fair to say that if `source_hash` isn't 32, the renderer must be misbehaving. In this case, I think `mojo::ReportBadMessage` is the right way to handle it rather than crashing the browser process.

    Line 586, Patchset 9 (Latest): // source-keyed cache do not support WebUI.
    Takashi Toyoshima . unresolved

    But you may still need to check if the caller renderer is locked to a network origin?

    Greg Thompson

    Please check with Chrome Security on this. Maybe we only want to cache inline scripts for renderers that are locked to http(s) sites. Do we use inline scripts in WebUI?

    Line 593, Patchset 9 (Latest): std::string resource_key = blink::ComposeSourceKeyedCacheKey(source_hash);
    Takashi Toyoshima . unresolved

    nit: const std::string

    Greg Thompson

    As per my other comment: keys are opaque binary blobs now, so this could be `base::HeapArray<uint8_t>` to avoid needing to stringify the hash digest.

    Takashi Toyoshima . unresolved

    Let's explain what's this magic is, e.g. why this is needed, and why this magic name is fine.
    Also, I think it's robust to modify the original GeneratedCodeCache::GetContextKey() so that we can have a single key generator for the ContextKey. Otherwise, this kind of wrapper causes confusion on creating a consistent key for all users in the chromium.
    For instance, if we follow the key name rules in the original method, you may use kSeparator (" \n") to append your specific new prefix, or suffix might be recommended?

    Takashi Nakayama

    @g...@chromium.org Do you have any insights on the format of `ContextKey`? I'm not completely confident on this topic.

    Greg Thompson

    `GetCacheId` ensures a distinct backend/database for each type of data. Can we not use a single backend for bytecode from both normal JS and inline JS? `blink::UrlToCodeCacheKey` adds a fixed prefix to URLs to generate a key in the cache given a URL. A corresponding `blink::SourceHashToCodeCacheKey` that added a distinct fixed prefix to source hashes should be sufficient to ensure that it's not possible to manufacture a collision between these two types in the same database.

    If we can use the same backend, we don't need to change `GetPendingBackend`.

    File third_party/blink/common/loader/code_cache_util.cc
    Line 23, Patchset 9 (Latest): return base::Base64Encode(source_hash);
    Greg Thompson . unresolved

    the `key` for PersistentCache is an opaque blob of bytes as of https://crrev.com/1590928, so there's no longer a need to stringify the hash.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Christian Dullweber
    Gerrit-Attention: Christian Dullweber <dull...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Comment-Date: Mon, 02 Mar 2026 10:59:25 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Takashi Nakayama (Gerrit)

    unread,
    Mar 2, 2026, 6:48:17 AM (11 days ago) Mar 2
    to Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, Christian Dullweber, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
    Attention needed from Christian Dullweber, Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Toyoshima

    Takashi Nakayama added 4 comments

    Commit Message
    Line 25, Patchset 9:* Prepend an `_sk_` prefix to source-keyed cache IDs within

    `CodeCacheWithPersistentCacheHost` to ensure proper isolation and prevent collisions.
    * Adds `blink::ComposeSourceKeyedCacheKey()` to `code_cache_util.h` to consistently compute cache keys. This method will also be used by the renderer-side implementation of InlineScriptCache.
    Takashi Toyoshima . resolved
    Takashi Toyoshima . unresolved

    Can we have a public version that contains the essential design part?

    Takashi Nakayama

    I will create the public version and get back to you soon.

    File content/browser/renderer_host/code_cache_host_impl.cc
    Line 583, Patchset 9: DCHECK_EQ(source_hash.size(), 32u);
    Takashi Toyoshima . unresolved

    Prefer CHECK over DCHECK if you want to have this check here.
    https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/checks.md

    Greg Thompson

    I think it's fair to say that if `source_hash` isn't 32, the renderer must be misbehaving. In this case, I think `mojo::ReportBadMessage` is the right way to handle it rather than crashing the browser process.

    Takashi Nakayama

    I want to confirm if mojo IPC does `mojo::ReportBadMessage` if the length doesn't match the mojo definition of `array<uint8, 32> script_hash`. If yes, I will keep this as `CHECK`; otherwise, I will change this line to `mojo::ReportBadMessage()`.

    Takashi Toyoshima . unresolved

    Let's explain what's this magic is, e.g. why this is needed, and why this magic name is fine.
    Also, I think it's robust to modify the original GeneratedCodeCache::GetContextKey() so that we can have a single key generator for the ContextKey. Otherwise, this kind of wrapper causes confusion on creating a consistent key for all users in the chromium.
    For instance, if we follow the key name rules in the original method, you may use kSeparator (" \n") to append your specific new prefix, or suffix might be recommended?

    Takashi Nakayama

    @g...@chromium.org Do you have any insights on the format of `ContextKey`? I'm not completely confident on this topic.

    Greg Thompson

    `GetCacheId` ensures a distinct backend/database for each type of data. Can we not use a single backend for bytecode from both normal JS and inline JS? `blink::UrlToCodeCacheKey` adds a fixed prefix to URLs to generate a key in the cache given a URL. A corresponding `blink::SourceHashToCodeCacheKey` that added a distinct fixed prefix to source hashes should be sufficient to ensure that it's not possible to manufacture a collision between these two types in the same database.

    If we can use the same backend, we don't need to change `GetPendingBackend`.

    Takashi Nakayama

    I feel like splitting backend for JS resources and inline JS is better because the inline script cache can have a different requirement for cache size, or a different LRU-history, from caches for JS resources.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Christian Dullweber
    • Greg Thompson
    • Hiroshige Hayashizaki
    • Kouhei Ueno
    • Leszek Swirski
    • Rakina Zata Amni
    • Takashi Toyoshima
    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: Iee5da70138cd0d1130b442d9edd8f9299577dbf4
    Gerrit-Change-Number: 7615151
    Gerrit-PatchSet: 10
    Gerrit-Owner: Takashi Nakayama <tn...@chromium.org>
    Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
    Gerrit-Reviewer: Greg Thompson <g...@chromium.org>
    Gerrit-Reviewer: Hiroshige Hayashizaki <hiro...@chromium.org>
    Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
    Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
    Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: Nate Chapin <jap...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
    Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Attention: Greg Thompson <g...@chromium.org>
    Gerrit-Attention: Christian Dullweber <dull...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Comment-Date: Mon, 02 Mar 2026 11:47:40 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
    Comment-In-Reply-To: Takashi Nakayama <tn...@chromium.org>
    Comment-In-Reply-To: Greg Thompson <g...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Christian Dullweber (Gerrit)

    unread,
    Mar 2, 2026, 7:10:20 AM (11 days ago) Mar 2
    to Takashi Nakayama, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
    Attention needed from Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni, Takashi Nakayama and Takashi Toyoshima

    Christian Dullweber added 1 comment

    Patchset-level comments
    File-level comment, Patchset 10 (Latest):
    Christian Dullweber . resolved

    components/content_settings/renderer/content_settings_agent_impl_browsertest.cc lgtm

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Greg Thompson
    • Hiroshige Hayashizaki
    • Kouhei Ueno
    • Leszek Swirski
    • Rakina Zata Amni
    • Takashi Nakayama
    • Takashi Toyoshima
    Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
    Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
    Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Attention: Greg Thompson <g...@chromium.org>
    Gerrit-Attention: Leszek Swirski <les...@chromium.org>
    Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Comment-Date: Mon, 02 Mar 2026 12:10:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Christian Dullweber (Gerrit)

    unread,
    Mar 2, 2026, 7:10:23 AM (11 days ago) Mar 2
    to Takashi Nakayama, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
    Attention needed from Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni, Takashi Nakayama and Takashi Toyoshima

    Christian Dullweber voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Greg Thompson
    • Hiroshige Hayashizaki
    • Kouhei Ueno
    • Leszek Swirski
    • Rakina Zata Amni
    • Takashi Nakayama
    • Takashi Toyoshima
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Gerrit-Comment-Date: Mon, 02 Mar 2026 12:10:10 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Greg Thompson (Gerrit)

      unread,
      Mar 2, 2026, 7:47:50 AM (11 days ago) Mar 2
      to Takashi Nakayama, Christian Dullweber, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
      Attention needed from Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni, Takashi Nakayama and Takashi Toyoshima

      Greg Thompson added 2 comments

      File content/browser/renderer_host/code_cache_host_impl.cc
      Line 583, Patchset 9: DCHECK_EQ(source_hash.size(), 32u);
      Takashi Toyoshima . unresolved

      Prefer CHECK over DCHECK if you want to have this check here.
      https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/checks.md

      Greg Thompson

      I think it's fair to say that if `source_hash` isn't 32, the renderer must be misbehaving. In this case, I think `mojo::ReportBadMessage` is the right way to handle it rather than crashing the browser process.

      Takashi Nakayama

      I want to confirm if mojo IPC does `mojo::ReportBadMessage` if the length doesn't match the mojo definition of `array<uint8, 32> script_hash`. If yes, I will keep this as `CHECK`; otherwise, I will change this line to `mojo::ReportBadMessage()`.

      Greg Thompson

      Ah! https://chromium.googlesource.com/chromium/src/+/main/mojo/public/tools/bindings/README.md#primitive-types and https://chromium.googlesource.com/chromium/src/+/main/mojo/public/cpp/bindings/README.md#structtraits-reference tell me that mojo deserialization will take care of it. Is it possible to use `std::array<uint8_t, 32>` here instead of `std::vector<uint8_t>`? I see that there is an `ArrayTraits` specialization for it in mojo/public/cpp/bindings/array_traits.h.

      Takashi Toyoshima . unresolved

      Let's explain what's this magic is, e.g. why this is needed, and why this magic name is fine.
      Also, I think it's robust to modify the original GeneratedCodeCache::GetContextKey() so that we can have a single key generator for the ContextKey. Otherwise, this kind of wrapper causes confusion on creating a consistent key for all users in the chromium.
      For instance, if we follow the key name rules in the original method, you may use kSeparator (" \n") to append your specific new prefix, or suffix might be recommended?

      Takashi Nakayama

      @g...@chromium.org Do you have any insights on the format of `ContextKey`? I'm not completely confident on this topic.

      Greg Thompson

      `GetCacheId` ensures a distinct backend/database for each type of data. Can we not use a single backend for bytecode from both normal JS and inline JS? `blink::UrlToCodeCacheKey` adds a fixed prefix to URLs to generate a key in the cache given a URL. A corresponding `blink::SourceHashToCodeCacheKey` that added a distinct fixed prefix to source hashes should be sufficient to ensure that it's not possible to manufacture a collision between these two types in the same database.

      If we can use the same backend, we don't need to change `GetPendingBackend`.

      Takashi Nakayama

      I feel like splitting backend for JS resources and inline JS is better because the inline script cache can have a different requirement for cache size, or a different LRU-history, from caches for JS resources.

      Greg Thompson

      The reason I bring this up is that `PersistentCacheCollection` keeps at most 100 (`kDefaultLruCacheCapacity`) backends open. If each renderer starts using twice as many backends, `PCC` may start closing backends sooner, leading to more abandonment and more cache misses when renderers need to re-fetch the params for a backend.

      Can you be more specific about how the caches would be treated differently?

      Open in Gerrit

      Related details

      Attention is currently required from:
      Gerrit-Attention: Leszek Swirski <les...@chromium.org>
      Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Comment-Date: Mon, 02 Mar 2026 12:47:36 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Takashi Nakayama (Gerrit)

      unread,
      Mar 3, 2026, 3:14:31 AM (10 days ago) Mar 3
      to Christian Dullweber, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
      Attention needed from Christian Dullweber, Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Toyoshima

      Takashi Nakayama added 6 comments

      File content/browser/renderer_host/code_cache_host_impl.cc
      Line 583, Patchset 9: DCHECK_EQ(source_hash.size(), 32u);
      Takashi Toyoshima . resolved

      Prefer CHECK over DCHECK if you want to have this check here.
      https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/checks.md

      Greg Thompson

      I think it's fair to say that if `source_hash` isn't 32, the renderer must be misbehaving. In this case, I think `mojo::ReportBadMessage` is the right way to handle it rather than crashing the browser process.

      Takashi Nakayama

      I want to confirm if mojo IPC does `mojo::ReportBadMessage` if the length doesn't match the mojo definition of `array<uint8, 32> script_hash`. If yes, I will keep this as `CHECK`; otherwise, I will change this line to `mojo::ReportBadMessage()`.

      Greg Thompson

      Ah! https://chromium.googlesource.com/chromium/src/+/main/mojo/public/tools/bindings/README.md#primitive-types and https://chromium.googlesource.com/chromium/src/+/main/mojo/public/cpp/bindings/README.md#structtraits-reference tell me that mojo deserialization will take care of it. Is it possible to use `std::array<uint8_t, 32>` here instead of `std::vector<uint8_t>`? I see that there is an `ArrayTraits` specialization for it in mojo/public/cpp/bindings/array_traits.h.

      Takashi Nakayama

      Let's keep this as `CHECK` and use `std::vector` instead, because making this an `std::array` would require not only an additional type definition in the .mojom file, but also an additional type converter that would be nearly useless.

      Line 593, Patchset 9: std::string resource_key = blink::ComposeSourceKeyedCacheKey(source_hash);
      Takashi Toyoshima . resolved

      nit: const std::string

      Greg Thompson

      As per my other comment: keys are opaque binary blobs now, so this could be `base::HeapArray<uint8_t>` to avoid needing to stringify the hash digest.

      Takashi Nakayama

      Marked as resolved because I deleted `blink::ComposeSourceKeyedCacheKey`

      Line 651, Patchset 9: std::string resource_key = blink::ComposeSourceKeyedCacheKey(source_hash);
      Takashi Toyoshima . resolved

      nit: const

      Takashi Nakayama

      ditto

      Takashi Toyoshima . unresolved

      Let's explain what's this magic is, e.g. why this is needed, and why this magic name is fine.
      Also, I think it's robust to modify the original GeneratedCodeCache::GetContextKey() so that we can have a single key generator for the ContextKey. Otherwise, this kind of wrapper causes confusion on creating a consistent key for all users in the chromium.
      For instance, if we follow the key name rules in the original method, you may use kSeparator (" \n") to append your specific new prefix, or suffix might be recommended?

      Takashi Nakayama

      @g...@chromium.org Do you have any insights on the format of `ContextKey`? I'm not completely confident on this topic.

      Greg Thompson

      `GetCacheId` ensures a distinct backend/database for each type of data. Can we not use a single backend for bytecode from both normal JS and inline JS? `blink::UrlToCodeCacheKey` adds a fixed prefix to URLs to generate a key in the cache given a URL. A corresponding `blink::SourceHashToCodeCacheKey` that added a distinct fixed prefix to source hashes should be sufficient to ensure that it's not possible to manufacture a collision between these two types in the same database.

      If we can use the same backend, we don't need to change `GetPendingBackend`.

      Takashi Nakayama

      I feel like splitting backend for JS resources and inline JS is better because the inline script cache can have a different requirement for cache size, or a different LRU-history, from caches for JS resources.

      Greg Thompson

      The reason I bring this up is that `PersistentCacheCollection` keeps at most 100 (`kDefaultLruCacheCapacity`) backends open. If each renderer starts using twice as many backends, `PCC` may start closing backends sooner, leading to more abandonment and more cache misses when renderers need to re-fetch the params for a backend.

      Can you be more specific about how the caches would be treated differently?

      Takashi Nakayama

      I don't have a very strong opinion on whether we should split backends or not, but let me list up two perspectives:

      1. Cache key: Resource script cache and inline script cache have different keying systems. The former uses `_key{$URL}` and the latter plans to use direct BLOB of SHA256 byte arrays. I worry that this can cause cache entry confusion if inline script cache shares its backend with resource script cache.

      2. Caching lifetime: Inline script cache entries can have a different lifetime from resource script. Typically, one page has a larger number of shorter scripts for inline scripts than for resource scripts. So inline scripts can affect the LRU strategy of resource script cache if we unify the backends.

      WDYT?

      File content/browser/renderer_host/code_cache_host_impl_unittest.cc
      Line 420, Patchset 9: std::array<uint8_t, 32> source_hash = {

      1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
      17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
      Takashi Toyoshima . unresolved

      can we use an actual sha256(data_str) here rather than a crafted magic numbers?

      Takashi Nakayama

      I couldn't find any functions in base library to calculate SHA256. Can I leave this as-is?

      File third_party/blink/common/loader/code_cache_util.cc
      Line 23, Patchset 9: return base::Base64Encode(source_hash);
      Greg Thompson . resolved

      the `key` for PersistentCache is an opaque blob of bytes as of https://crrev.com/1590928, so there's no longer a need to stringify the hash.

      Takashi Nakayama

      Thanks! Removed the function.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Christian Dullweber
      • Greg Thompson
      • Hiroshige Hayashizaki
      • Kouhei Ueno
      • Leszek Swirski
      • Rakina Zata Amni
      • Takashi Toyoshima
      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: Iee5da70138cd0d1130b442d9edd8f9299577dbf4
        Gerrit-Change-Number: 7615151
        Gerrit-PatchSet: 12
        Gerrit-Owner: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
        Gerrit-Reviewer: Greg Thompson <g...@chromium.org>
        Gerrit-Reviewer: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
        Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Attention: Greg Thompson <g...@chromium.org>
        Gerrit-Attention: Christian Dullweber <dull...@chromium.org>
        Gerrit-Attention: Leszek Swirski <les...@chromium.org>
        Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Comment-Date: Tue, 03 Mar 2026 08:14:07 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Greg Thompson (Gerrit)

        unread,
        Mar 3, 2026, 4:57:41 AM (10 days ago) Mar 3
        to Takashi Nakayama, Christian Dullweber, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
        Attention needed from Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni, Takashi Nakayama and Takashi Toyoshima

        Greg Thompson added 2 comments

        File content/browser/renderer_host/code_cache_host_impl.cc
        Takashi Toyoshima . unresolved

        Let's explain what's this magic is, e.g. why this is needed, and why this magic name is fine.
        Also, I think it's robust to modify the original GeneratedCodeCache::GetContextKey() so that we can have a single key generator for the ContextKey. Otherwise, this kind of wrapper causes confusion on creating a consistent key for all users in the chromium.
        For instance, if we follow the key name rules in the original method, you may use kSeparator (" \n") to append your specific new prefix, or suffix might be recommended?

        Takashi Nakayama

        @g...@chromium.org Do you have any insights on the format of `ContextKey`? I'm not completely confident on this topic.

        Greg Thompson

        `GetCacheId` ensures a distinct backend/database for each type of data. Can we not use a single backend for bytecode from both normal JS and inline JS? `blink::UrlToCodeCacheKey` adds a fixed prefix to URLs to generate a key in the cache given a URL. A corresponding `blink::SourceHashToCodeCacheKey` that added a distinct fixed prefix to source hashes should be sufficient to ensure that it's not possible to manufacture a collision between these two types in the same database.

        If we can use the same backend, we don't need to change `GetPendingBackend`.

        Takashi Nakayama

        I feel like splitting backend for JS resources and inline JS is better because the inline script cache can have a different requirement for cache size, or a different LRU-history, from caches for JS resources.

        Greg Thompson

        The reason I bring this up is that `PersistentCacheCollection` keeps at most 100 (`kDefaultLruCacheCapacity`) backends open. If each renderer starts using twice as many backends, `PCC` may start closing backends sooner, leading to more abandonment and more cache misses when renderers need to re-fetch the params for a backend.

        Can you be more specific about how the caches would be treated differently?

        Takashi Nakayama

        I don't have a very strong opinion on whether we should split backends or not, but let me list up two perspectives:

        1. Cache key: Resource script cache and inline script cache have different keying systems. The former uses `_key{$URL}` and the latter plans to use direct BLOB of SHA256 byte arrays. I worry that this can cause cache entry confusion if inline script cache shares its backend with resource script cache.

        2. Caching lifetime: Inline script cache entries can have a different lifetime from resource script. Typically, one page has a larger number of shorter scripts for inline scripts than for resource scripts. So inline scripts can affect the LRU strategy of resource script cache if we unify the backends.

        WDYT?

        Greg Thompson

        I don't have a very strong opinion on whether we should split backends or not, but let me list up two perspectives:

        1. Cache key: Resource script cache and inline script cache have different keying systems. The former uses `_key{$URL}` and the latter plans to use direct BLOB of SHA256 byte arrays. I worry that this can cause cache entry confusion if inline script cache shares its backend with resource script cache.

        If the inline script cache were to prepend a fixed prefix to the hash digest (e.g., "_digest{BLOB}"), then there is no risk of collision. If collisions are ruled out, what concern(s) remain?

        2. Caching lifetime: Inline script cache entries can have a different lifetime from resource script. Typically, one page has a larger number of shorter scripts for inline scripts than for resource scripts. So inline scripts can affect the LRU strategy of resource script cache if we unify the backends.

        PersistentCache-backed code cache doesn't track time-of-last-use of individual cache entries, and therefore can't purge individual entries based on that. When the size of the cache needs to be reduced, it's done based on the modification times of the database files themselves. We could purge based on time-of-insert, which we do track in the entry metadata. Since we don't have a separate index for resource vs. inline, I can see how it would be more complicated to have a distinct rule for removing old entries of each type in this case. It remains to be seen if it's necessary to go that route, however.

        Just throwing this idea out there: we could use a distinct `PersistentCacheCollection` instance for the inline script cache. This would allow it to have its own target disk footprint and cache capacity (max number of active backends).

        File content/browser/renderer_host/code_cache_host_impl_unittest.cc
        Line 420, Patchset 9: std::array<uint8_t, 32> source_hash = {
        1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
        17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
        Takashi Toyoshima . unresolved

        can we use an actual sha256(data_str) here rather than a crafted magic numbers?

        Takashi Nakayama

        I couldn't find any functions in base library to calculate SHA256. Can I leave this as-is?

        Greg Thompson

        there's one in `//crypto/sha2.h`. `content_unittests` already has a dependency on `//crypto`, so you should be clear to use it in this context.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Hiroshige Hayashizaki
        • Kouhei Ueno
        • Leszek Swirski
        • Rakina Zata Amni
        • Takashi Nakayama
        • Takashi Toyoshima
        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: Iee5da70138cd0d1130b442d9edd8f9299577dbf4
        Gerrit-Change-Number: 7615151
        Gerrit-PatchSet: 13
        Gerrit-Owner: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
        Gerrit-Reviewer: Greg Thompson <g...@chromium.org>
        Gerrit-Reviewer: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
        Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Attention: Leszek Swirski <les...@chromium.org>
        Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Comment-Date: Tue, 03 Mar 2026 09:57:24 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Greg Thompson (Gerrit)

        unread,
        Mar 3, 2026, 5:18:50 AM (10 days ago) Mar 3
        to Takashi Nakayama, Christian Dullweber, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
        Attention needed from Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni, Takashi Nakayama and Takashi Toyoshima

        Greg Thompson added 1 comment

        File content/browser/renderer_host/code_cache_host_impl_unittest.cc
        Line 420, Patchset 9: std::array<uint8_t, 32> source_hash = {
        1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
        17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
        Takashi Toyoshima . unresolved

        can we use an actual sha256(data_str) here rather than a crafted magic numbers?

        Takashi Nakayama

        I couldn't find any functions in base library to calculate SHA256. Can I leave this as-is?

        Greg Thompson

        there's one in `//crypto/sha2.h`. `content_unittests` already has a dependency on `//crypto`, so you should be clear to use it in this context.

        Greg Thompson

        correction: `//crypto/hash.h`.

        Gerrit-Comment-Date: Tue, 03 Mar 2026 10:18:36 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Takashi Toyoshima (Gerrit)

        unread,
        Mar 5, 2026, 12:00:51 AM (8 days ago) Mar 5
        to Takashi Nakayama, Christian Dullweber, Chromium IPC Reviews, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
        Attention needed from Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Nakayama

        Takashi Toyoshima added 1 comment

        File content/browser/renderer_host/code_cache_host_impl.cc
        Line 586, Patchset 9: // source-keyed cache do not support WebUI.
        Takashi Toyoshima . unresolved

        But you may still need to check if the caller renderer is locked to a network origin?

        Greg Thompson

        Please check with Chrome Security on this. Maybe we only want to cache inline scripts for renderers that are locked to http(s) sites. Do we use inline scripts in WebUI?

        Takashi Toyoshima

        Yeah, WebUI's script is under control in the chromium, and I believe this optimization is for the public web sites that may not take the best approach for performance.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Hiroshige Hayashizaki
        • Kouhei Ueno
        • Leszek Swirski
        • Rakina Zata Amni
        • Takashi Nakayama
        Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Attention: Leszek Swirski <les...@chromium.org>
        Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Comment-Date: Thu, 05 Mar 2026 05:00:20 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
        Comment-In-Reply-To: Greg Thompson <g...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Takashi Nakayama (Gerrit)

        unread,
        Mar 5, 2026, 11:51:36 PM (7 days ago) Mar 5
        to Christian Dullweber, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
        Attention needed from Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Toyoshima

        Takashi Nakayama added 4 comments

        File content/browser/renderer_host/code_cache_host_impl.cc
        Takashi Nakayama

        PersistentCache-backed code cache doesn't track time-of-last-use of individual cache entries

        That is good to know! Then, I would like to adopt your idea of sharing the backend with resource script cache and adding `_digest` to cache keys, at least, on the initial stage. I made some code change to implement this. PTAL.

        Splitting `PersistentCacheCollection` sounds good, but I would like to collect data of inline script cache first to minimize uncertainty. Thanks!

        File content/browser/renderer_host/code_cache_host_impl_unittest.cc
        Line 420, Patchset 9: std::array<uint8_t, 32> source_hash = {
        1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
        17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
        Takashi Toyoshima . resolved

        can we use an actual sha256(data_str) here rather than a crafted magic numbers?

        Takashi Nakayama

        I couldn't find any functions in base library to calculate SHA256. Can I leave this as-is?

        Greg Thompson

        there's one in `//crypto/sha2.h`. `content_unittests` already has a dependency on `//crypto`, so you should be clear to use it in this context.

        Greg Thompson

        correction: `//crypto/hash.h`.

        Takashi Nakayama

        Updated code to use `crypto::hash::Sha256()`. Thanks for pointing it out!

        Line 723, Patchset 9: std::array<uint8_t, 32> source_hash = {

        1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
        17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
        Takashi Toyoshima . resolved

        ditto

        Takashi Nakayama

        Done

        Line 773, Patchset 9: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,

        17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
        Takashi Toyoshima . resolved

        ditto

        Takashi Nakayama

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Greg Thompson
        • Hiroshige Hayashizaki
        • Kouhei Ueno
        • Leszek Swirski
        • Rakina Zata Amni
        • Takashi Toyoshima
        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: Iee5da70138cd0d1130b442d9edd8f9299577dbf4
        Gerrit-Change-Number: 7615151
        Gerrit-PatchSet: 14
        Gerrit-Owner: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
        Gerrit-Reviewer: Greg Thompson <g...@chromium.org>
        Gerrit-Reviewer: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
        Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Attention: Greg Thompson <g...@chromium.org>
        Gerrit-Attention: Leszek Swirski <les...@chromium.org>
        Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Comment-Date: Fri, 06 Mar 2026 04:51:03 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Greg Thompson (Gerrit)

        unread,
        Mar 6, 2026, 5:05:54 AM (7 days ago) Mar 6
        to Takashi Nakayama, Christian Dullweber, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
        Attention needed from Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni, Takashi Nakayama and Takashi Toyoshima

        Greg Thompson added 16 comments

        Patchset-level comments
        File-level comment, Patchset 14 (Latest):
        Greg Thompson . resolved

        looks pretty good!

        Commit Message
        Line 19, Patchset 14 (Latest):* Introduces the `CodeCacheKeyType` enum to differentiate between
        Greg Thompson . unresolved

        update description

        Line 22, Patchset 14 (Latest):* Updates `GeneratedCodeCacheContext` to accept generic cache keys
        Greg Thompson . unresolved

        can remove this item now

        Line 24, Patchset 14 (Latest):* Prepend an `_sk_` prefix to source-keyed cache IDs within
        Greg Thompson . unresolved

        remove this item? i think the point of this is covered by the item below

        File components/content_settings/renderer/content_settings_agent_impl_browsertest.cc
        Line 27, Patchset 14 (Latest):#include "third_party/blink/public/mojom/loader/code_cache.mojom-shared.h"
        Greg Thompson . unresolved

        omit -- this header is exported by code_cache.mojom.h, so it doesn't need to be included explicitly like this.

        File content/browser/code_cache/generated_code_cache_context.h
        Line 136, Patchset 14 (Latest): // context uses a seperate database file. The second key is the resource
        // url or the serialized script hash used on that cache.
        Greg Thompson . unresolved

        nit: maybe "prefixed resource URL or hash digest of a serialized inline script" so that readers don't think it's the raw URL/digest?

        Line 135, Patchset 14 (Latest): // isolation context from the collection. This insures that each isolation
        Greg Thompson . unresolved

        while you're editing this, would you change this to "ensures" :-)

        (English.... amiright?)

        Line 106, Patchset 14 (Latest): // Returns the entry for `cache_key` in the cache identified by `context_key`,
        Greg Thompson . unresolved

        here, too

        Line 89, Patchset 14 (Latest): // Inserts `content` and `metadata` for `cache_key` in the cache identified by
        Greg Thompson . unresolved

        is there any reason not to keep this as "resource_key"?

        File content/browser/renderer_host/code_cache_host_impl.h
        Line 120, Patchset 14 (Latest): base::span<const uint8_t> source_hash,
        Greg Thompson . unresolved

        (pedant warning!) "message digest" is the name of the thing that pops out of a hash function, so wdyt of "source_digest" here and elsewhere?

        File content/browser/renderer_host/code_cache_host_impl.cc
        Line 409, Patchset 14 (Latest): CHECK_IS_TEST();
        Greg Thompson . unresolved

        since this method has "ForTesting" in its name, do we need this line?

        Line 579, Patchset 14 (Latest):
        Greg Thompson . unresolved

        should we report a bad message if `cache_type` != `blink::mojom::CodeCacheType::kJavascript`?

        Line 633, Patchset 14 (Latest): CHECK_IS_TEST(); // Fetch is handled directly in the client in blink.
        Greg Thompson . unresolved

        since this method has "ForTesting" in its name, do we need this line? we have this check in `FetchCachedCode` because that's a non-test method that we want to use only in tests for the sake of convenience.

        File third_party/blink/common/loader/code_cache_util.cc
        Line 9, Patchset 14 (Latest):#include <cstdint>
        Greg Thompson . unresolved

        please remove -- `stdint.h` is the right header since Chromium uses `uint8_t` rather than `std::uint8_t`

        Line 29, Patchset 14 (Latest):std::vector<uint8_t> ComposeSourceKeyedCacheKey(
        Greg Thompson . unresolved

        can we use `base::HeapArray<uint8_t>` (or maybe `const uint8_t`?) instead of `vector`? we don't expect this to need to be resized and such by its holders after creation.

        Line 31, Patchset 14 (Latest): std::vector<uint8_t> key;
        key.reserve(std::size(kSourceKeyedCodeCacheKeyPrefix) + source_hash.size());
        key.insert_range(key.end(),
        base::as_byte_span(kSourceKeyedCodeCacheKeyPrefix));
        key.insert_range(key.end(), source_hash);
        Greg Thompson . unresolved
        this boils down to a malloc and two memcpys:
        ```
        auto prefix = base::byte_span_from_cstring(kSourceKeyedCodeCacheKeyPrefix);
        auto key =
        base::HeapArray<uint8_t>::Uninit(prefix.size() + source_hash.size());
        key.first(prefix.size()).copy_from_nonoverlapping(prefix);
        key.last(source_hash.size()).copy_from_nonoverlapping(source_hash);
        ```
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Hiroshige Hayashizaki
        • Kouhei Ueno
        • Leszek Swirski
        • Rakina Zata Amni
        • Takashi Nakayama
        • Takashi Toyoshima
        Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Attention: Leszek Swirski <les...@chromium.org>
        Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Comment-Date: Fri, 06 Mar 2026 10:05:39 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Takashi Nakayama (Gerrit)

        unread,
        Mar 6, 2026, 10:32:28 AM (6 days ago) Mar 6
        to Christian Dullweber, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
        Attention needed from Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Toyoshima

        Takashi Nakayama added 15 comments

        Commit Message
        Line 19, Patchset 14:* Introduces the `CodeCacheKeyType` enum to differentiate between
        Greg Thompson . resolved

        update description

        Takashi Nakayama

        Done

        Line 22, Patchset 14:* Updates `GeneratedCodeCacheContext` to accept generic cache keys
        Greg Thompson . resolved

        can remove this item now

        Takashi Nakayama

        Done

        Line 24, Patchset 14:* Prepend an `_sk_` prefix to source-keyed cache IDs within
        Greg Thompson . resolved

        remove this item? i think the point of this is covered by the item below

        Takashi Nakayama

        Done

        File components/content_settings/renderer/content_settings_agent_impl_browsertest.cc
        Line 27, Patchset 14:#include "third_party/blink/public/mojom/loader/code_cache.mojom-shared.h"
        Greg Thompson . resolved

        omit -- this header is exported by code_cache.mojom.h, so it doesn't need to be included explicitly like this.

        Takashi Nakayama

        Done

        File content/browser/code_cache/generated_code_cache_context.h
        Line 136, Patchset 14: // context uses a seperate database file. The second key is the resource

        // url or the serialized script hash used on that cache.
        Greg Thompson . resolved

        nit: maybe "prefixed resource URL or hash digest of a serialized inline script" so that readers don't think it's the raw URL/digest?

        Takashi Nakayama

        Done

        Line 135, Patchset 14: // isolation context from the collection. This insures that each isolation
        Greg Thompson . resolved

        while you're editing this, would you change this to "ensures" :-)

        (English.... amiright?)

        Takashi Nakayama

        Done

        Line 106, Patchset 14: // Returns the entry for `cache_key` in the cache identified by `context_key`,
        Greg Thompson . resolved

        here, too

        Takashi Nakayama

        Acknowledged

        Line 89, Patchset 14: // Inserts `content` and `metadata` for `cache_key` in the cache identified by
        Greg Thompson . unresolved

        is there any reason not to keep this as "resource_key"?

        Takashi Nakayama

        In blink, the word "resource" sometimes refers to a file with URL (e.g., `blink::Resource`). Renaming is to clarify that these functions can be also store inline script cache.

        File content/browser/renderer_host/code_cache_host_impl.cc
        Line 409, Patchset 14: CHECK_IS_TEST();
        Greg Thompson . resolved

        since this method has "ForTesting" in its name, do we need this line?

        Takashi Nakayama

        Let me keep this as-is because the "ForTesting" suffix is just a warning for developers and does not enforce any restrictions.

        Line 579, Patchset 14:
        Greg Thompson . resolved

        should we report a bad message if `cache_type` != `blink::mojom::CodeCacheType::kJavascript`?

        Takashi Nakayama

        I don't think we need that check because the current browser-side implementation (this CL) does not explicitly ban source-keyed cache for wasm. If we ban wasm, the check can be done on the renderer side.

        Line 633, Patchset 14: CHECK_IS_TEST(); // Fetch is handled directly in the client in blink.
        Greg Thompson . resolved

        since this method has "ForTesting" in its name, do we need this line? we have this check in `FetchCachedCode` because that's a non-test method that we want to use only in tests for the sake of convenience.

        Takashi Nakayama

        ditto.

        Line 680, Patchset 7:
        Takashi Toyoshima . resolved
        Takashi Nakayama

        Let me resolve this thread.

        File third_party/blink/common/loader/code_cache_util.cc
        Line 9, Patchset 14:#include <cstdint>
        Greg Thompson . resolved

        please remove -- `stdint.h` is the right header since Chromium uses `uint8_t` rather than `std::uint8_t`

        Takashi Nakayama

        Done

        Line 29, Patchset 14:std::vector<uint8_t> ComposeSourceKeyedCacheKey(
        Greg Thompson . resolved

        can we use `base::HeapArray<uint8_t>` (or maybe `const uint8_t`?) instead of `vector`? we don't expect this to need to be resized and such by its holders after creation.

        Takashi Nakayama

        Done

        Line 31, Patchset 14: std::vector<uint8_t> key;

        key.reserve(std::size(kSourceKeyedCodeCacheKeyPrefix) + source_hash.size());
        key.insert_range(key.end(),
        base::as_byte_span(kSourceKeyedCodeCacheKeyPrefix));
        key.insert_range(key.end(), source_hash);
        Greg Thompson . resolved
        this boils down to a malloc and two memcpys:
        ```
        auto prefix = base::byte_span_from_cstring(kSourceKeyedCodeCacheKeyPrefix);
        auto key =
        base::HeapArray<uint8_t>::Uninit(prefix.size() + source_hash.size());
        key.first(prefix.size()).copy_from_nonoverlapping(prefix);
        key.last(source_hash.size()).copy_from_nonoverlapping(source_hash);
        ```
        Takashi Nakayama

        Thank you for the great suggestion! Reflected to the code.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Greg Thompson
        • Hiroshige Hayashizaki
        • Kouhei Ueno
        • Leszek Swirski
        • Rakina Zata Amni
        • Takashi Toyoshima
        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: Iee5da70138cd0d1130b442d9edd8f9299577dbf4
        Gerrit-Change-Number: 7615151
        Gerrit-PatchSet: 16
        Gerrit-Owner: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
        Gerrit-Reviewer: Greg Thompson <g...@chromium.org>
        Gerrit-Reviewer: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
        Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Attention: Greg Thompson <g...@chromium.org>
        Gerrit-Attention: Leszek Swirski <les...@chromium.org>
        Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Comment-Date: Fri, 06 Mar 2026 15:31:53 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Takashi Nakayama (Gerrit)

        unread,
        Mar 6, 2026, 10:38:25 AM (6 days ago) Mar 6
        to Christian Dullweber, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
        Attention needed from Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Toyoshima

        Takashi Nakayama added 2 comments

        File content/browser/code_cache/generated_code_cache_context.h
        Line 136, Patchset 16 (Latest): // context uses a seperate database file. The second key is the prefixed
        Takashi Nakayama . unresolved

        Will handle:

        Please fix this WARNING reported by Spellchecker: "seperate" is a possible misspelling of "separate".

        To bypass Spellchecker, add...

        "seperate" is a possible misspelling of "separate".

        To bypass Spellchecker, add a footer with DISABLE_SPELLCHECKER

        File content/browser/renderer_host/code_cache_host_impl.h
        Line 120, Patchset 14: base::span<const uint8_t> source_hash,
        Greg Thompson . resolved

        (pedant warning!) "message digest" is the name of the thing that pops out of a hash function, so wdyt of "source_digest" here and elsewhere?

        Takashi Nakayama

        I understand your warning, but let me keep `source_hash` because it is more difficult to see the meaning of `digest` when it appears with the non-crypto (or non-hash related) contexts 😞

        Gerrit-Comment-Date: Fri, 06 Mar 2026 15:37:53 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Greg Thompson <g...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Takashi Toyoshima (Gerrit)

        unread,
        Mar 9, 2026, 3:42:43 AM (4 days ago) Mar 9
        to Takashi Nakayama, Christian Dullweber, Chromium IPC Reviews, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
        Attention needed from Greg Thompson, Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Nakayama

        Takashi Toyoshima added 1 comment

        Patchset-level comments
        File-level comment, Patchset 16 (Latest):
        Takashi Toyoshima . resolved

        reset my attention flag until existing comments are resolved

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Greg Thompson
        • Hiroshige Hayashizaki
        • Kouhei Ueno
        • Leszek Swirski
        • Rakina Zata Amni
        • Takashi Nakayama
        Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Attention: Greg Thompson <g...@chromium.org>
        Gerrit-Attention: Leszek Swirski <les...@chromium.org>
        Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Comment-Date: Mon, 09 Mar 2026 07:42:18 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Greg Thompson (Gerrit)

        unread,
        Mar 9, 2026, 4:38:33 AM (4 days ago) Mar 9
        to Takashi Nakayama, Christian Dullweber, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
        Attention needed from Hiroshige Hayashizaki, Kouhei Ueno, Leszek Swirski, Rakina Zata Amni and Takashi Nakayama

        Greg Thompson added 3 comments

        File content/browser/code_cache/generated_code_cache_context.h
        Line 89, Patchset 14: // Inserts `content` and `metadata` for `cache_key` in the cache identified by
        Greg Thompson . resolved

        is there any reason not to keep this as "resource_key"?

        Takashi Nakayama

        In blink, the word "resource" sometimes refers to a file with URL (e.g., `blink::Resource`). Renaming is to clarify that these functions can be also store inline script cache.

        Greg Thompson

        I'm a little concerned about `context` vs. `cache` in the names. `context_key` determines which cache will be accessed. To me, `cache_key` sounds awfully close to "the key that identifies the cache", and I think using `cache` in the name is redundant since this whole method is about inserting something into a cache.

        I had picked "resource" as a generic word for "thing inserted into the cache". Maybe we can just call this `key` and forget about a prefix. But then it collides a bit with `context_key`. Maybe that should really be `cache_id`? Naming is hard.

        I'll resolve this since I don't think it's really a big deal, but please chime in if you have other suggestions. Thanks.

        File content/browser/renderer_host/code_cache_host_impl.cc
        Line 409, Patchset 14: CHECK_IS_TEST();
        Greg Thompson . unresolved

        since this method has "ForTesting" in its name, do we need this line?

        Takashi Nakayama

        Let me keep this as-is because the "ForTesting" suffix is just a warning for developers and does not enforce any restrictions.

        Greg Thompson

        Please remove as per https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md#tests-and-test_only-code. The presubmit rule for use of `...ForTesting` is the Chromium way to deal with this. We should not have `CHECK_IS_TEST()` in such functions/method.

        Line 579, Patchset 14:
        Greg Thompson . unresolved

        should we report a bad message if `cache_type` != `blink::mojom::CodeCacheType::kJavascript`?

        Takashi Nakayama

        I don't think we need that check because the current browser-side implementation (this CL) does not explicitly ban source-keyed cache for wasm. If we ban wasm, the check can be done on the renderer side.

        Greg Thompson

        We know that no renderer should try to insert into the WASM cache today. If one does, it's either due to a logic bug in the renderer or a compromised renderer. Reporting this as a bad message ensures that the renderer is promptly terminated. This is a security protection.

        Open in Gerrit

        Related details

        Attention is currently required from:
        Gerrit-Attention: Leszek Swirski <les...@chromium.org>
        Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Comment-Date: Mon, 09 Mar 2026 08:38:18 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Takashi Nakayama (Gerrit)

        unread,
        2:10 PM (8 hours ago) 2:10 PM
        to Christian Dullweber, Chromium IPC Reviews, Takashi Toyoshima, Kouhei Ueno, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
        Attention needed from Greg Thompson, Hiroshige Hayashizaki and Kouhei Ueno

        Takashi Nakayama added 4 comments

        File content/browser/code_cache/generated_code_cache_context.h
        Line 136, Patchset 16: // context uses a seperate database file. The second key is the prefixed
        Takashi Nakayama . resolved

        Will handle:

        Please fix this WARNING reported by Spellchecker: "seperate" is a possible misspelling of "separate".

        To bypass Spellchecker, add...

        "seperate" is a possible misspelling of "separate".

        To bypass Spellchecker, add a footer with DISABLE_SPELLCHECKER

        Takashi Nakayama

        Done

        File content/browser/renderer_host/code_cache_host_impl.cc
        Line 409, Patchset 14: CHECK_IS_TEST();
        Greg Thompson . resolved

        since this method has "ForTesting" in its name, do we need this line?

        Takashi Nakayama

        Let me keep this as-is because the "ForTesting" suffix is just a warning for developers and does not enforce any restrictions.

        Greg Thompson

        Please remove as per https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md#tests-and-test_only-code. The presubmit rule for use of `...ForTesting` is the Chromium way to deal with this. We should not have `CHECK_IS_TEST()` in such functions/method.

        Takashi Nakayama

        I misunderstood the style guide. Thanks for pointing out. Fixed.

        FWIW: The presubmit check for `ForTesting` seems to have some false-positives per https://crbug.com/40176497.

        Line 579, Patchset 14:
        Greg Thompson . resolved

        should we report a bad message if `cache_type` != `blink::mojom::CodeCacheType::kJavascript`?

        Takashi Nakayama

        I don't think we need that check because the current browser-side implementation (this CL) does not explicitly ban source-keyed cache for wasm. If we ban wasm, the check can be done on the renderer side.

        Greg Thompson

        We know that no renderer should try to insert into the WASM cache today. If one does, it's either due to a logic bug in the renderer or a compromised renderer. Reporting this as a bad message ensures that the renderer is promptly terminated. This is a security protection.

        Takashi Nakayama

        Acknowledged. I removed `cache_type` from the arguments of `DidGenerateSourceKeyedCacheableMetadata`.

        Line 586, Patchset 9: // source-keyed cache do not support WebUI.
        Takashi Toyoshima . resolved

        But you may still need to check if the caller renderer is locked to a network origin?

        Greg Thompson

        Please check with Chrome Security on this. Maybe we only want to cache inline scripts for renderers that are locked to http(s) sites. Do we use inline scripts in WebUI?

        Takashi Toyoshima

        Yeah, WebUI's script is under control in the chromium, and I believe this optimization is for the public web sites that may not take the best approach for performance.

        Takashi Nakayama

        Added `CheckSecurityForAccessingSourceKeyedCodeCacheData()` and a call for it here to make sure WebUI and extentions are not cached. PTAL

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Greg Thompson
        • Hiroshige Hayashizaki
        • Kouhei Ueno
        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: Iee5da70138cd0d1130b442d9edd8f9299577dbf4
        Gerrit-Change-Number: 7615151
        Gerrit-PatchSet: 19
        Gerrit-Owner: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
        Gerrit-Reviewer: Greg Thompson <g...@chromium.org>
        Gerrit-Reviewer: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
        Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Nate Chapin <jap...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Attention: Greg Thompson <g...@chromium.org>
        Gerrit-Comment-Date: Thu, 12 Mar 2026 18:09:57 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Kouhei Ueno (Gerrit)

        unread,
        9:36 PM (1 hour ago) 9:36 PM
        to Takashi Nakayama, Christian Dullweber, Chromium IPC Reviews, Takashi Toyoshima, Hiroshige Hayashizaki, Leszek Swirski, Greg Thompson, Rakina Zata Amni, chromium...@chromium.org, Nate Chapin, AyeAye, Chromium LUCI CQ, ipc-securi...@chromium.org, blink-re...@chromium.org, gavinp...@chromium.org, loading...@chromium.org, alexmo...@chromium.org, msrame...@chromium.org, kinuko...@chromium.org, loading-re...@chromium.org, blink-...@chromium.org, dullweb...@chromium.org, navigation...@chromium.org, creis...@chromium.org
        Attention needed from Greg Thompson, Hiroshige Hayashizaki and Takashi Nakayama

        Kouhei Ueno voted and added 2 comments

        Votes added by Kouhei Ueno

        Code-Review+1

        2 comments

        Commit Message
        Takashi Toyoshima . unresolved

        Can we have a public version that contains the essential design part?

        Kouhei Ueno

        +1

        File content/browser/renderer_host/code_cache_host_impl.cc
        Line 145, Patchset 19 (Latest):}
        Kouhei Ueno . unresolved

        Would you note a FIXME comment that we shouldn't be using render_process_id to determine the NIK but CodeCacheHost should be made DocumentService and we should consult the RFH's origin here (and in other places)?

        cc: @g...@chromium.org

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Greg Thompson
        • Hiroshige Hayashizaki
        • Takashi Nakayama
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement 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: Iee5da70138cd0d1130b442d9edd8f9299577dbf4
          Gerrit-Change-Number: 7615151
          Gerrit-PatchSet: 19
          Gerrit-Owner: Takashi Nakayama <tn...@chromium.org>
          Gerrit-Reviewer: Christian Dullweber <dull...@chromium.org>
          Gerrit-Reviewer: Greg Thompson <g...@chromium.org>
          Gerrit-Reviewer: Hiroshige Hayashizaki <hiro...@chromium.org>
          Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
          Gerrit-Reviewer: Leszek Swirski <les...@chromium.org>
          Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
          Gerrit-Reviewer: Takashi Nakayama <tn...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
          Gerrit-CC: Nate Chapin <jap...@chromium.org>
          Gerrit-CC: gwsq
          Gerrit-Attention: Takashi Nakayama <tn...@chromium.org>
          Gerrit-Attention: Hiroshige Hayashizaki <hiro...@chromium.org>
          Gerrit-Attention: Greg Thompson <g...@chromium.org>
          Gerrit-Comment-Date: Fri, 13 Mar 2026 01:36:23 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages