[source-phase-imports] Move JS streaming out of BackgroundProcessor [chromium/src : main]

0 views
Skip to first unread message

Luis Pardo (Gerrit)

unread,
Dec 10, 2025, 11:22:51 PM (4 days ago) Dec 10
to Kouhei Ueno, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Kouhei Ueno

Luis Pardo added 1 comment

Patchset-level comments
Open in Gerrit

Related details

Attention is currently required from:
  • Kouhei Ueno
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: I236971c7dc066f9a975a672b47c560dfa6f8a10e
Gerrit-Change-Number: 7180526
Gerrit-PatchSet: 10
Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
Gerrit-Comment-Date: Thu, 11 Dec 2025 04:22:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kouhei Ueno (Gerrit)

unread,
Dec 11, 2025, 1:25:28 AM (4 days ago) Dec 11
to Luis Pardo, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Luis Pardo

Kouhei Ueno added 1 comment

Patchset-level comments
Kouhei Ueno . resolved

This CL is quite involved. Can I request a design doc that aids with class diagrams / their responsibilities?

Open in Gerrit

Related details

Attention is currently required from:
  • Luis Pardo
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: I236971c7dc066f9a975a672b47c560dfa6f8a10e
Gerrit-Change-Number: 7180526
Gerrit-PatchSet: 10
Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Luis Pardo <lpardo...@microsoft.com>
Gerrit-Comment-Date: Thu, 11 Dec 2025 06:25:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Luis Pardo (Gerrit)

unread,
Dec 11, 2025, 2:02:06 AM (4 days ago) Dec 11
to Kouhei Ueno, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from Kouhei Ueno

Luis Pardo added 1 comment

Patchset-level comments
Kouhei Ueno . unresolved

This CL is quite involved. Can I request a design doc that aids with class diagrams / their responsibilities?

Luis Pardo

I'll update the related [design doc](https://docs.google.com/document/d/1J5z96hCpVToQejAHFhEih3xo9QxKl4-CSFPCnwuH1Bk/edit?usp=sharing), the design in that document is now outdated. In the meantime here is a short summary; and it would be great if you could take a first look at the changes in the [next CL](https://chromium-review.googlesource.com/c/chromium/src/+/7212259), particularly those in `module_script_loader.*` and `wasm_module_script.*`.

Before this CL `BackgroundResourceScriptStreamer::BackgroundProcessor` implemented `BackgroundResponseProcessor::MaybeStartProcessingResponse` as well as the specifics of the JS streaming logic: when to allow/suppress streaming, code caching, etc. Now, `BackgroundResourceScriptStreamer::BackgroundProcessor` only implements `BackgroundResponseProcessor::MaybeStartProcessingResponse` and the logic and class members specific to JS streaming are encapsulated in the `BackgroundJSStreamManager` class, created after a JS mime type is received. The next CL introduces `BackgroundWasmStreamManager`, created for a Wasm mime type.

The class members that remain in `BackgroundResourceScriptStreamer::BackgroundProcessor` and referred from `BackgroundJSStreamManager` are those that are set before knowing the response's mime type.

Open in Gerrit

Related details

Attention is currently required from:
  • 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: I236971c7dc066f9a975a672b47c560dfa6f8a10e
    Gerrit-Change-Number: 7180526
    Gerrit-PatchSet: 10
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Comment-Date: Thu, 11 Dec 2025 07:01:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Kouhei Ueno <kou...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Luis Pardo (Gerrit)

    unread,
    Dec 11, 2025, 10:51:58 PM (3 days ago) Dec 11
    to Kouhei Ueno, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Kentaro Hara, Raphael Kubo da Costa, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from Kouhei Ueno

    Luis Pardo added 1 comment

    Patchset-level comments
    Kouhei Ueno . unresolved

    This CL is quite involved. Can I request a design doc that aids with class diagrams / their responsibilities?

    Luis Pardo

    I'll update the related [design doc](https://docs.google.com/document/d/1J5z96hCpVToQejAHFhEih3xo9QxKl4-CSFPCnwuH1Bk/edit?usp=sharing), the design in that document is now outdated. In the meantime here is a short summary; and it would be great if you could take a first look at the changes in the [next CL](https://chromium-review.googlesource.com/c/chromium/src/+/7212259), particularly those in `module_script_loader.*` and `wasm_module_script.*`.

    Before this CL `BackgroundResourceScriptStreamer::BackgroundProcessor` implemented `BackgroundResponseProcessor::MaybeStartProcessingResponse` as well as the specifics of the JS streaming logic: when to allow/suppress streaming, code caching, etc. Now, `BackgroundResourceScriptStreamer::BackgroundProcessor` only implements `BackgroundResponseProcessor::MaybeStartProcessingResponse` and the logic and class members specific to JS streaming are encapsulated in the `BackgroundJSStreamManager` class, created after a JS mime type is received. The next CL introduces `BackgroundWasmStreamManager`, created for a Wasm mime type.

    The class members that remain in `BackgroundResourceScriptStreamer::BackgroundProcessor` and referred from `BackgroundJSStreamManager` are those that are set before knowing the response's mime type.

    Luis Pardo

    @kou...@chromium.org I added some descriptions and diagrams to [this doc](https://docs.google.com/document/d/1J5z96hCpVToQejAHFhEih3xo9QxKl4-CSFPCnwuH1Bk/edit?usp=sharing) under the "blink>BackgroundResourceScriptStreamer refactoring" section. Also did a little refactoring to improve this code. PATL.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • 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: I236971c7dc066f9a975a672b47c560dfa6f8a10e
    Gerrit-Change-Number: 7180526
    Gerrit-PatchSet: 13
    Gerrit-Owner: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Reviewer: Luis Pardo <lpardo...@microsoft.com>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Comment-Date: Fri, 12 Dec 2025 03:51:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Luis Pardo <lpardo...@microsoft.com>
    Comment-In-Reply-To: Kouhei Ueno <kou...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages