[DOM Storage] Replace string source with StorageAreaSource struct [chromium/src : main]

0 views
Skip to first unread message

Xiaohan Zhao (Gerrit)

unread,
Feb 24, 2026, 2:56:52 PM (5 days ago) Feb 24
to Steve Becker, Evan Stade, Chromium IPC Reviews, Chromium LUCI CQ, Mirko Bonadei, Jerome Jiang, AyeAye, chromium...@chromium.org, extension...@chromium.org, dullweb...@chromium.org, chromium-a...@chromium.org, msrame...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, fuzzin...@chromium.org, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, penghuan...@chromium.org, fgal...@chromium.org, mar...@chromium.org, chrome-intell...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dmurph+watchi...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, edgesto...@microsoft.com, ipc-securi...@chromium.org, kinuko...@chromium.org, storage...@chromium.org
Attention needed from Chromium IPC Reviews, Evan Stade and Steve Becker

Xiaohan Zhao added 1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Xiaohan Zhao . resolved

Hi folks, please take a look when you have time. Thanks in advance for reviewing!

Open in Gerrit

Related details

Attention is currently required from:
  • Chromium IPC Reviews
  • Evan Stade
  • Steve Becker
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: I3cb2a79b41740bad0ca9f8fa60fad807f69c408b
Gerrit-Change-Number: 7597837
Gerrit-PatchSet: 4
Gerrit-Owner: Xiaohan Zhao <xiaoh...@microsoft.com>
Gerrit-Reviewer: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-Reviewer: Evan Stade <evan...@microsoft.com>
Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
Gerrit-Reviewer: Xiaohan Zhao <xiaoh...@microsoft.com>
Gerrit-CC: Jerome Jiang <ji...@chromium.org>
Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
Gerrit-Attention: Evan Stade <evan...@microsoft.com>
Gerrit-Attention: Steve Becker <ste...@microsoft.com>
Gerrit-Attention: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-Comment-Date: Tue, 24 Feb 2026 19:56:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

gwsq (Gerrit)

unread,
Feb 24, 2026, 2:59:29 PM (5 days ago) Feb 24
to Xiaohan Zhao, Chromium IPC Reviews, Takashi Toyoshima, Steve Becker, Evan Stade, Chromium LUCI CQ, Mirko Bonadei, Jerome Jiang, AyeAye, chromium...@chromium.org, extension...@chromium.org, dullweb...@chromium.org, chromium-a...@chromium.org, msrame...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, fuzzin...@chromium.org, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, penghuan...@chromium.org, fgal...@chromium.org, mar...@chromium.org, chrome-intell...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dmurph+watchi...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, edgesto...@microsoft.com, ipc-securi...@chromium.org, kinuko...@chromium.org, storage...@chromium.org
Attention needed from Evan Stade, Steve Becker 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:
  • Evan Stade
  • Steve Becker
  • 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: I3cb2a79b41740bad0ca9f8fa60fad807f69c408b
Gerrit-Change-Number: 7597837
Gerrit-PatchSet: 4
Gerrit-Owner: Xiaohan Zhao <xiaoh...@microsoft.com>
Gerrit-Reviewer: Evan Stade <evan...@microsoft.com>
Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Reviewer: Xiaohan Zhao <xiaoh...@microsoft.com>
Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
Gerrit-CC: Jerome Jiang <ji...@chromium.org>
Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
Gerrit-CC: gwsq
Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Attention: Evan Stade <evan...@microsoft.com>
Gerrit-Attention: Steve Becker <ste...@microsoft.com>
Gerrit-Comment-Date: Tue, 24 Feb 2026 19:59:05 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Evan Stade (Gerrit)

unread,
Feb 24, 2026, 5:19:52 PM (5 days ago) Feb 24
to Xiaohan Zhao, Chromium IPC Reviews, Takashi Toyoshima, Steve Becker, Chromium LUCI CQ, Mirko Bonadei, Jerome Jiang, AyeAye, chromium...@chromium.org, extension...@chromium.org, dullweb...@chromium.org, chromium-a...@chromium.org, msrame...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, fuzzin...@chromium.org, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, penghuan...@chromium.org, fgal...@chromium.org, mar...@chromium.org, chrome-intell...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dmurph+watchi...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, edgesto...@microsoft.com, ipc-securi...@chromium.org, kinuko...@chromium.org, storage...@chromium.org
Attention needed from Steve Becker, Takashi Toyoshima and Xiaohan Zhao

Evan Stade added 2 comments

File third_party/blink/public/mojom/dom_storage/storage_area.mojom
Line 100, Patchset 4 (Latest): StorageAreaSource source)
Evan Stade . unresolved

probably ideal for all of these to be optional, i.e. `StorageAreaSource?`, since there are cases where we're passing an empty value.

File third_party/blink/renderer/modules/storage/cached_storage_area.cc
Line 177, Patchset 4 (Latest): String id = String::Number(base::RandUint64());
Evan Stade . unresolved

so while we're at it can we make this a `base::Token`? (In some cases one might want to use an `UnguessableToken`, but here we explicitly do not need use this for security, instead relying on the mojo pipes between renderer and browser to correctly direct information, so it's better not to imply the unguessable nature of the token is a security measure.)

Open in Gerrit

Related details

Attention is currently required from:
  • Steve Becker
  • Takashi Toyoshima
  • Xiaohan Zhao
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: I3cb2a79b41740bad0ca9f8fa60fad807f69c408b
    Gerrit-Change-Number: 7597837
    Gerrit-PatchSet: 4
    Gerrit-Owner: Xiaohan Zhao <xiaoh...@microsoft.com>
    Gerrit-Reviewer: Evan Stade <evan...@microsoft.com>
    Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
    Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-Reviewer: Xiaohan Zhao <xiaoh...@microsoft.com>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: Jerome Jiang <ji...@chromium.org>
    Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
    Gerrit-CC: gwsq
    Gerrit-Attention: Xiaohan Zhao <xiaoh...@microsoft.com>
    Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
    Gerrit-Attention: Steve Becker <ste...@microsoft.com>
    Gerrit-Comment-Date: Tue, 24 Feb 2026 22:19:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Evan Stade (Gerrit)

    unread,
    Feb 24, 2026, 5:19:59 PM (5 days ago) Feb 24
    to Xiaohan Zhao, Chromium IPC Reviews, Takashi Toyoshima, Steve Becker, Chromium LUCI CQ, Mirko Bonadei, Jerome Jiang, AyeAye, chromium...@chromium.org, extension...@chromium.org, dullweb...@chromium.org, chromium-a...@chromium.org, msrame...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, fuzzin...@chromium.org, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, penghuan...@chromium.org, fgal...@chromium.org, mar...@chromium.org, chrome-intell...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dmurph+watchi...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, edgesto...@microsoft.com, ipc-securi...@chromium.org, kinuko...@chromium.org, storage...@chromium.org
    Attention needed from Steve Becker, Takashi Toyoshima and Xiaohan Zhao

    Evan Stade added 1 comment

    Patchset-level comments
    Evan Stade . resolved

    and thanks for doing this!

    Gerrit-Comment-Date: Tue, 24 Feb 2026 22:19:53 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Xiaohan Zhao (Gerrit)

    unread,
    Feb 27, 2026, 2:24:39 PM (2 days ago) Feb 27
    to Chromium IPC Reviews, Takashi Toyoshima, Steve Becker, Evan Stade, Chromium LUCI CQ, Mirko Bonadei, Jerome Jiang, AyeAye, chromium...@chromium.org, extension...@chromium.org, dullweb...@chromium.org, chromium-a...@chromium.org, msrame...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, fuzzin...@chromium.org, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, penghuan...@chromium.org, fgal...@chromium.org, mar...@chromium.org, chrome-intell...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dmurph+watchi...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, edgesto...@microsoft.com, ipc-securi...@chromium.org, kinuko...@chromium.org, storage...@chromium.org
    Attention needed from Evan Stade, Steve Becker and Takashi Toyoshima

    Xiaohan Zhao added 2 comments

    File third_party/blink/public/mojom/dom_storage/storage_area.mojom
    Line 100, Patchset 4: StorageAreaSource source)
    Evan Stade . resolved

    probably ideal for all of these to be optional, i.e. `StorageAreaSource?`, since there are cases where we're passing an empty value.

    Xiaohan Zhao

    Done

    File third_party/blink/renderer/modules/storage/cached_storage_area.cc
    Line 177, Patchset 4: String id = String::Number(base::RandUint64());
    Evan Stade . resolved

    so while we're at it can we make this a `base::Token`? (In some cases one might want to use an `UnguessableToken`, but here we explicitly do not need use this for security, instead relying on the mojo pipes between renderer and browser to correctly direct information, so it's better not to imply the unguessable nature of the token is a security measure.)

    Xiaohan Zhao

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Evan Stade
    • Steve Becker
    • 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: I3cb2a79b41740bad0ca9f8fa60fad807f69c408b
      Gerrit-Change-Number: 7597837
      Gerrit-PatchSet: 6
      Gerrit-Owner: Xiaohan Zhao <xiaoh...@microsoft.com>
      Gerrit-Reviewer: Evan Stade <evan...@microsoft.com>
      Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
      Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
      Gerrit-Reviewer: Xiaohan Zhao <xiaoh...@microsoft.com>
      Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-CC: Jerome Jiang <ji...@chromium.org>
      Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
      Gerrit-CC: gwsq
      Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
      Gerrit-Attention: Evan Stade <evan...@microsoft.com>
      Gerrit-Attention: Steve Becker <ste...@microsoft.com>
      Gerrit-Comment-Date: Fri, 27 Feb 2026 19:24:33 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Evan Stade <evan...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Evan Stade (Gerrit)

      unread,
      Feb 27, 2026, 3:15:43 PM (2 days ago) Feb 27
      to Xiaohan Zhao, Chromium IPC Reviews, Takashi Toyoshima, Steve Becker, Chromium LUCI CQ, Mirko Bonadei, Jerome Jiang, AyeAye, chromium...@chromium.org, extension...@chromium.org, dullweb...@chromium.org, chromium-a...@chromium.org, msrame...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, fuzzin...@chromium.org, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, penghuan...@chromium.org, fgal...@chromium.org, mar...@chromium.org, chrome-intell...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dmurph+watchi...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, edgesto...@microsoft.com, ipc-securi...@chromium.org, kinuko...@chromium.org, storage...@chromium.org
      Attention needed from Steve Becker, Takashi Toyoshima and Xiaohan Zhao

      Evan Stade added 1 comment

      File third_party/blink/renderer/modules/storage/cached_storage_area.cc
      Line 177, Patchset 4: String id = String::Number(base::RandUint64());
      Evan Stade . unresolved

      so while we're at it can we make this a `base::Token`? (In some cases one might want to use an `UnguessableToken`, but here we explicitly do not need use this for security, instead relying on the mojo pipes between renderer and browser to correctly direct information, so it's better not to imply the unguessable nature of the token is a security measure.)

      Xiaohan Zhao

      Done

      Evan Stade

      Sorry, I meant to use `Token` throughout code, not just to generate a string. `Token` has native mojom support, `mojo_base.mojom.Token`.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Steve Becker
      • Takashi Toyoshima
      • Xiaohan Zhao
      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: I3cb2a79b41740bad0ca9f8fa60fad807f69c408b
        Gerrit-Change-Number: 7597837
        Gerrit-PatchSet: 6
        Gerrit-Owner: Xiaohan Zhao <xiaoh...@microsoft.com>
        Gerrit-Reviewer: Evan Stade <evan...@microsoft.com>
        Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
        Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
        Gerrit-Reviewer: Xiaohan Zhao <xiaoh...@microsoft.com>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Jerome Jiang <ji...@chromium.org>
        Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Attention: Xiaohan Zhao <xiaoh...@microsoft.com>
        Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
        Gerrit-Attention: Steve Becker <ste...@microsoft.com>
        Gerrit-Comment-Date: Fri, 27 Feb 2026 20:15:36 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Xiaohan Zhao <xiaoh...@microsoft.com>
        Comment-In-Reply-To: Evan Stade <evan...@microsoft.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Takashi Toyoshima (Gerrit)

        unread,
        Mar 1, 2026, 11:44:56 PM (2 hours ago) Mar 1
        to Xiaohan Zhao, Chromium IPC Reviews, Steve Becker, Evan Stade, Chromium LUCI CQ, Mirko Bonadei, Jerome Jiang, AyeAye, chromium...@chromium.org, extension...@chromium.org, dullweb...@chromium.org, chromium-a...@chromium.org, msrame...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, fuzzin...@chromium.org, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, penghuan...@chromium.org, fgal...@chromium.org, mar...@chromium.org, chrome-intell...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dmurph+watchi...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, edgesto...@microsoft.com, ipc-securi...@chromium.org, kinuko...@chromium.org, storage...@chromium.org
        Attention needed from Steve Becker and Xiaohan Zhao

        Takashi Toyoshima added 3 comments

        File third_party/blink/public/mojom/dom_storage/storage_area.mojom
        Line 19, Patchset 6 (Latest): // null, the key was newly added and had no previous value stored. `source`
        // is null when the mutation was not initiated by a specific page (e.g.
        // browser-initiated or internal reconciliation).
        Takashi Toyoshima . unresolved

        As this seems relevant to other methods below, we may have this part in the interface comment?

        Line 52, Patchset 6 (Latest):// Identifies the source of a storage mutation for observer notifications.
        Takashi Toyoshima . unresolved

        This can compile, but it may be nicer to declare before the first use above.

        Line 62, Patchset 6 (Latest):// store.
        Takashi Toyoshima . unresolved

        Let's add an explanation on the nullability of the `source` parameter.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Steve Becker
        • Xiaohan Zhao
        Gerrit-Attention: Steve Becker <ste...@microsoft.com>
        Gerrit-Comment-Date: Mon, 02 Mar 2026 04:44:30 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Takashi Toyoshima (Gerrit)

        unread,
        12:36 AM (2 hours ago) 12:36 AM
        to Xiaohan Zhao, Chromium IPC Reviews, Steve Becker, Evan Stade, Chromium LUCI CQ, Mirko Bonadei, Jerome Jiang, AyeAye, chromium...@chromium.org, extension...@chromium.org, dullweb...@chromium.org, chromium-a...@chromium.org, msrame...@chromium.org, chrome-intelligence-te...@google.com, cblume...@chromium.org, fuzzin...@chromium.org, devtools...@chromium.org, feature-me...@chromium.org, jz...@chromium.org, penghuan...@chromium.org, fgal...@chromium.org, mar...@chromium.org, chrome-intell...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, dmurph+watchi...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, edgesto...@microsoft.com, ipc-securi...@chromium.org, kinuko...@chromium.org, storage...@chromium.org
        Attention needed from Steve Becker and Xiaohan Zhao

        Takashi Toyoshima added 1 comment

        File third_party/blink/renderer/modules/storage/cached_storage_area.cc
        Line 178, Patchset 6 (Latest): String id = String(base::Token::CreateRandom().ToString());
        Takashi Toyoshima . unresolved

        We may clarify this change in the CL description?

        Another question is shall we use base::UnguessableToken that can be mapped to mojom_base.UnguessableToken directly rather than using string in Mojo.

        Gerrit-Comment-Date: Mon, 02 Mar 2026 05:36:31 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages