Enable IndexedDB inspection in workers [chromium/src : main]

0 views
Skip to first unread message

Wang Neden (Gerrit)

unread,
Sep 6, 2025, 2:44:26 PMSep 6
to Yang Guo, AyeAye, chromium...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dmurph+wa...@chromium.org, edgesto...@microsoft.com, enne...@chromium.org, kinuko...@chromium.org
Attention needed from Yang Guo

Wang Neden voted and added 1 comment

Votes added by Wang Neden

Auto-Submit+1
Commit-Queue+2

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Wang Neden . resolved

Hi Yang Guo,

This is the backend/native part of a change to enable storage inspection (like IndexedDB) for service workers, with a focus on Chrome Extensions.

The main logic here is refactoring InspectorIndexedDBAgent to operate on ExecutionContext and attaching the necessary protocol handlers for worker targets.

The corresponding frontend changes are in a separate CL in the devtools-frontend repository here:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6917118

Any feedback on the backend changes in this CL would be greatly appreciated.

Thanks a lot!

Open in Gerrit

Related details

Attention is currently required from:
  • Yang Guo
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
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: I9ce7163787d2e1926709af626aff526c0dd6b7e3
Gerrit-Change-Number: 6919038
Gerrit-PatchSet: 1
Gerrit-Owner: Wang Neden <nede...@gmail.com>
Gerrit-Reviewer: Wang Neden <nede...@gmail.com>
Gerrit-Reviewer: Yang Guo <yan...@chromium.org>
Gerrit-Attention: Yang Guo <yan...@chromium.org>
Gerrit-Comment-Date: Sat, 06 Sep 2025 18:43:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Rudenko (Gerrit)

unread,
Sep 11, 2025, 8:58:26 AM (13 days ago) Sep 11
to Wang Neden, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dmurph+wa...@chromium.org, edgesto...@microsoft.com, enne...@chromium.org, kinuko...@chromium.org
Attention needed from Wang Neden

Alex Rudenko added 1 comment

Patchset-level comments
Alex Rudenko . resolved

Thanks! Could you please add tests for the IndexedDB domain for workers (service/shared/dedicated) to https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/http/tests/inspector-protocol/?

Open in Gerrit

Related details

Attention is currently required from:
  • Wang Neden
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
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: I9ce7163787d2e1926709af626aff526c0dd6b7e3
Gerrit-Change-Number: 6919038
Gerrit-PatchSet: 1
Gerrit-Owner: Wang Neden <nede...@gmail.com>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Wang Neden <nede...@gmail.com>
Gerrit-CC: Benedikt Meurer <bme...@chromium.org>
Gerrit-Attention: Wang Neden <nede...@gmail.com>
Gerrit-Comment-Date: Thu, 11 Sep 2025 12:58:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Wang Neden (Gerrit)

unread,
Sep 19, 2025, 3:08:11 AM (5 days ago) Sep 19
to Alex Rudenko, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dmurph+wa...@chromium.org, edgesto...@microsoft.com, enne...@chromium.org, kinuko...@chromium.org

Wang Neden voted and added 1 comment

Votes added by Wang Neden

Auto-Submit+1
Commit-Queue+2

1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Wang Neden . resolved

Hi Alex,

This patchset implements the backend support for the new `Storage.getStorageKey` CDP command, which is a key step towards enabling storage inspection features (like IndexedDB) for worker targets.

**Summary of Changes:**

*   **New CDP Command:** The new `Storage.getStorageKey(optional frameId)` command is implemented in `StorageHandler`. The old `getStorageKeyForFrame` is now officially deprecated in the PDL.
* **Web Tests:** As you suggested, I've added a suite of new web tests to validate the functionality:
* Three tests specifically verify that `Storage.getStorageKey` returns the correct key for dedicated, shared, and service workers.
* Three more comprehensive tests confirm that the full IndexedDB protocol (`requestDatabaseNames`, `requestData`, etc.) now works correctly when targeting each of the three worker types.

The private helper approach for `GetStorageKeyForFrame` maintains code quality while the deprecated public method ensures backward compatibility for now. I've also added a `TODO` pointing to the follow-up bug for its eventual removal.

Looking forward to your feedback!

Thanks

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
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: I9ce7163787d2e1926709af626aff526c0dd6b7e3
Gerrit-Change-Number: 6919038
Gerrit-PatchSet: 3
Gerrit-Owner: Wang Neden <nede...@gmail.com>
Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
Gerrit-Reviewer: Wang Neden <nede...@gmail.com>
Gerrit-CC: Benedikt Meurer <bme...@chromium.org>
Gerrit-Comment-Date: Fri, 19 Sep 2025 07:07:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Alex Rudenko (Gerrit)

unread,
Sep 19, 2025, 5:36:12 AM (5 days ago) Sep 19
to Wang Neden, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dmurph+wa...@chromium.org, edgesto...@microsoft.com, enne...@chromium.org, kinuko...@chromium.org
Attention needed from Wang Neden

Alex Rudenko added 4 comments

Patchset-level comments
Alex Rudenko . resolved

Thanks, I think this looks good. I had a few comments and I will start the CQ to see if tests pass before doing another review pass.

File content/browser/devtools/browser_devtools_agent_host.cc
Line 213, Patchset 3 (Latest): session->CreateAndAddHandler<protocol::StorageHandler>(GetId(),
Alex Rudenko . unresolved

let's pass the host itself like it is done in the tracing handler below? This should allow us to avoid look ups by id.

File content/browser/devtools/protocol/storage_handler.h
Line 49, Patchset 3 (Latest): explicit StorageHandler(const std::string& host_id,
Alex Rudenko . unresolved

If passing the host itself would not work for some reason, let's rename host_id to target_id as in other handlers such as TargetHandler.

File third_party/blink/public/devtools_protocol/domains/Storage.pdl
Line 243, Patchset 3 (Latest): command getStorageKeyForFrame
Alex Rudenko . unresolved
```suggestion
deprecated command getStorageKeyForFrame
```
Open in Gerrit

Related details

Attention is currently required from:
  • Wang Neden
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    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: I9ce7163787d2e1926709af626aff526c0dd6b7e3
    Gerrit-Change-Number: 6919038
    Gerrit-PatchSet: 3
    Gerrit-Owner: Wang Neden <nede...@gmail.com>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Wang Neden <nede...@gmail.com>
    Gerrit-CC: Benedikt Meurer <bme...@chromium.org>
    Gerrit-Attention: Wang Neden <nede...@gmail.com>
    Gerrit-Comment-Date: Fri, 19 Sep 2025 09:35:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Wang Neden (Gerrit)

    unread,
    Sep 23, 2025, 12:24:48 AM (yesterday) Sep 23
    to Alex Rudenko, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dmurph+wa...@chromium.org, edgesto...@microsoft.com, enne...@chromium.org, kinuko...@chromium.org
    Attention needed from Alex Rudenko

    Wang Neden voted and added 4 comments

    Votes added by Wang Neden

    Auto-Submit+1
    Commit-Queue+2

    4 comments

    Patchset-level comments
    File-level comment, Patchset 4 (Latest):
    Wang Neden . resolved

    Hi Alex,

    Thanks a lot for your detailed feedback!

    I've updated the patch to incorporate your suggestions:
    1. The `StorageHandler` now receives the `DevToolsAgentHostImpl*` directly, removing the need for an ID lookup.
    2. `getStorageKeyForFrame` has been marked as `deprecated`.

    Regarding the web tests, the trybot failures you may have seen were caused by a pre-existing object lifetime issue. That issue has now been resolved in the separate CL you recently reviewed (https://chromium-review.googlesource.com/c/chromium/src/+/6965169), and the tests in this patch have been updated to align with that fix.

    The corresponding DevTools frontend change has also been updated to keep everything in sync.

    Thanks again for your guidance!

    File content/browser/devtools/browser_devtools_agent_host.cc
    Line 213, Patchset 3: session->CreateAndAddHandler<protocol::StorageHandler>(GetId(),
    Alex Rudenko . resolved

    let's pass the host itself like it is done in the tracing handler below? This should allow us to avoid look ups by id.

    Wang Neden

    Done

    File content/browser/devtools/protocol/storage_handler.h
    Line 49, Patchset 3: explicit StorageHandler(const std::string& host_id,
    Alex Rudenko . resolved

    If passing the host itself would not work for some reason, let's rename host_id to target_id as in other handlers such as TargetHandler.

    Wang Neden

    Done

    File third_party/blink/public/devtools_protocol/domains/Storage.pdl
    Line 243, Patchset 3: command getStorageKeyForFrame
    Alex Rudenko . resolved
    ```suggestion
    deprecated command getStorageKeyForFrame
    ```
    Wang Neden

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Rudenko
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    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: I9ce7163787d2e1926709af626aff526c0dd6b7e3
    Gerrit-Change-Number: 6919038
    Gerrit-PatchSet: 4
    Gerrit-Owner: Wang Neden <nede...@gmail.com>
    Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Reviewer: Wang Neden <nede...@gmail.com>
    Gerrit-CC: Benedikt Meurer <bme...@chromium.org>
    Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
    Gerrit-Comment-Date: Tue, 23 Sep 2025 04:24:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Alex Rudenko <alexr...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Alex Rudenko (Gerrit)

    unread,
    Sep 23, 2025, 4:24:54 AM (22 hours ago) Sep 23
    to Wang Neden, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dmurph+wa...@chromium.org, edgesto...@microsoft.com, enne...@chromium.org, kinuko...@chromium.org
    Attention needed from Wang Neden

    Alex Rudenko added 1 comment

    File third_party/blink/public/devtools_protocol/domains/Storage.pdl
    Line 243, Patchset 4 (Latest): deprecated command getStorageKeyForFrame
    Alex Rudenko . unresolved

    let's update existing tests to use the new command for frames https://source.chromium.org/search?q=getStorageKeyForFrame&sq=&ss=chromium%2Fchromium%2Fsrc:third_party%2Fblink%2Fweb_tests%2Fhttp%2Ftests%2Finspector-protocol%2Fstorage%2F Otherwise, I think the frameId in the new method has no test coverage?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Wang Neden
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      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: I9ce7163787d2e1926709af626aff526c0dd6b7e3
      Gerrit-Change-Number: 6919038
      Gerrit-PatchSet: 4
      Gerrit-Owner: Wang Neden <nede...@gmail.com>
      Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
      Gerrit-Reviewer: Wang Neden <nede...@gmail.com>
      Gerrit-CC: Benedikt Meurer <bme...@chromium.org>
      Gerrit-Attention: Wang Neden <nede...@gmail.com>
      Gerrit-Comment-Date: Tue, 23 Sep 2025 08:24:38 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alex Rudenko (Gerrit)

      unread,
      Sep 23, 2025, 4:26:09 AM (22 hours ago) Sep 23
      to Wang Neden, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dmurph+wa...@chromium.org, edgesto...@microsoft.com, enne...@chromium.org, kinuko...@chromium.org
      Attention needed from Wang Neden

      Alex Rudenko voted and added 1 comment

      Votes added by Alex Rudenko

      Code-Review+1

      1 comment

      File third_party/blink/public/devtools_protocol/domains/Storage.pdl
      Line 243, Patchset 4 (Latest): deprecated command getStorageKeyForFrame
      Alex Rudenko . unresolved

      let's update existing tests to use the new command for frames https://source.chromium.org/search?q=getStorageKeyForFrame&sq=&ss=chromium%2Fchromium%2Fsrc:third_party%2Fblink%2Fweb_tests%2Fhttp%2Ftests%2Finspector-protocol%2Fstorage%2F Otherwise, I think the frameId in the new method has no test coverage?

      Alex Rudenko

      Although I guess it could be done when the deprecated method is removed.

      Gerrit-Comment-Date: Tue, 23 Sep 2025 08:25:54 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Wang Neden (Gerrit)

      unread,
      Sep 23, 2025, 11:07:40 AM (15 hours ago) Sep 23
      to Alex Rudenko, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dmurph+wa...@chromium.org, edgesto...@microsoft.com, enne...@chromium.org, kinuko...@chromium.org
      Attention needed from Alex Rudenko

      Wang Neden voted and added 1 comment

      Votes added by Wang Neden

      Auto-Submit+1
      Commit-Queue+2

      1 comment

      File third_party/blink/public/devtools_protocol/domains/Storage.pdl
      Line 243, Patchset 4: deprecated command getStorageKeyForFrame
      Alex Rudenko . resolved

      let's update existing tests to use the new command for frames https://source.chromium.org/search?q=getStorageKeyForFrame&sq=&ss=chromium%2Fchromium%2Fsrc:third_party%2Fblink%2Fweb_tests%2Fhttp%2Ftests%2Finspector-protocol%2Fstorage%2F Otherwise, I think the frameId in the new method has no test coverage?

      Alex Rudenko

      Although I guess it could be done when the deprecated method is removed.

      Wang Neden

      That's a great point. You're right, it's much better to update the tests now to ensure the `frameId` parameter in the new `getStorageKey` command has proper test coverage.

      I've updated the remaining web tests to use the new command as you suggested.

      Thanks for catching that! The patch is ready for another look.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alex Rudenko
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      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: I9ce7163787d2e1926709af626aff526c0dd6b7e3
      Gerrit-Change-Number: 6919038
      Gerrit-PatchSet: 5
      Gerrit-Owner: Wang Neden <nede...@gmail.com>
      Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
      Gerrit-Reviewer: Wang Neden <nede...@gmail.com>
      Gerrit-CC: Benedikt Meurer <bme...@chromium.org>
      Gerrit-Attention: Alex Rudenko <alexr...@chromium.org>
      Gerrit-Comment-Date: Tue, 23 Sep 2025 15:07:28 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Alex Rudenko (Gerrit)

      unread,
      Sep 23, 2025, 11:37:48 AM (15 hours ago) Sep 23
      to Wang Neden, Danil Somsikov, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, devtools-re...@chromium.org, devtools...@chromium.org, dmurph+wa...@chromium.org, edgesto...@microsoft.com, enne...@chromium.org, kinuko...@chromium.org
      Attention needed from Danil Somsikov and Wang Neden

      Alex Rudenko added 1 comment

      Patchset-level comments
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Danil Somsikov
      • Wang Neden
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      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: I9ce7163787d2e1926709af626aff526c0dd6b7e3
      Gerrit-Change-Number: 6919038
      Gerrit-PatchSet: 5
      Gerrit-Owner: Wang Neden <nede...@gmail.com>
      Gerrit-Reviewer: Alex Rudenko <alexr...@chromium.org>
      Gerrit-Reviewer: Danil Somsikov <d...@chromium.org>
      Gerrit-Reviewer: Wang Neden <nede...@gmail.com>
      Gerrit-CC: Benedikt Meurer <bme...@chromium.org>
      Gerrit-Attention: Danil Somsikov <d...@chromium.org>
      Gerrit-Attention: Wang Neden <nede...@gmail.com>
      Gerrit-Comment-Date: Tue, 23 Sep 2025 15:37:34 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages