Scheduling APIs: Make web scheduling queues pausable [chromium/src : main]

0 views
Skip to first unread message

Scott Haseley (Gerrit)

unread,
Mar 26, 2026, 8:02:42 PM (7 days ago) Mar 26
to Kouhei Ueno, Mingyu Lei, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
Attention needed from Kouhei Ueno and Mingyu Lei

Scott Haseley added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Scott Haseley . resolved

+Kouhei: not sure if you're familiar with worker scheduler, but maybe enough to review this?

Also +Mingyu for BFCache -- could you review also?

Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Kouhei Ueno
  • Mingyu Lei
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement 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: I58dd3bd6a743b37d4ddafab624cef43748ca1c1a
Gerrit-Change-Number: 7698742
Gerrit-PatchSet: 2
Gerrit-Owner: Scott Haseley <shas...@chromium.org>
Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
Gerrit-Attention: Mingyu Lei <le...@chromium.org>
Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
Gerrit-Comment-Date: Fri, 27 Mar 2026 00:02:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Mingyu Lei (Gerrit)

unread,
Mar 30, 2026, 4:29:48 AM (3 days ago) Mar 30
to Scott Haseley, Kouhei Ueno, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
Attention needed from Kouhei Ueno and Scott Haseley

Mingyu Lei added 2 comments

Commit Message
Line 19, Patchset 2 (Latest): test BFCache. This test fails without the test.
Mingyu Lei . unresolved
nit: 
```suggestion
test BFCache. This test fails without the fix.
```
File third_party/blink/web_tests/wpt_internal/scheduler/back-forward-cache/post-task-pause-dedicated-worker.window.js
Line 35, Patchset 2 (Latest): // Get the max gap between timestamps in the worker.
Mingyu Lei . unresolved

I'm wondering how do we ensure that a new timestamp is sucessfully pushed by the scheduler between we navigate back and check the timestamps list?

Open in Gerrit

Related details

Attention is currently required from:
  • Kouhei Ueno
  • Scott Haseley
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I58dd3bd6a743b37d4ddafab624cef43748ca1c1a
    Gerrit-Change-Number: 7698742
    Gerrit-PatchSet: 2
    Gerrit-Owner: Scott Haseley <shas...@chromium.org>
    Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
    Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: Scott Haseley <shas...@chromium.org>
    Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
    Gerrit-Comment-Date: Mon, 30 Mar 2026 08:29:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Scott Haseley (Gerrit)

    unread,
    Mar 30, 2026, 4:20:11 PM (3 days ago) Mar 30
    to Kouhei Ueno, Mingyu Lei, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
    Attention needed from Kouhei Ueno and Mingyu Lei

    Scott Haseley added 2 comments

    Commit Message
    Line 19, Patchset 2: test BFCache. This test fails without the test.
    Mingyu Lei . resolved
    nit: 
    ```suggestion
    test BFCache. This test fails without the fix.
    ```
    Scott Haseley

    Done

    File third_party/blink/web_tests/wpt_internal/scheduler/back-forward-cache/post-task-pause-dedicated-worker.window.js
    Line 35, Patchset 2: // Get the max gap between timestamps in the worker.
    Mingyu Lei . resolved

    I'm wondering how do we ensure that a new timestamp is sucessfully pushed by the scheduler between we navigate back and check the timestamps list?

    Scott Haseley

    Thanks. Added an async hop to ensure a final entry is logged. This might also be a pre-existing race in the test I copied.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Kouhei Ueno
    • Mingyu Lei
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I58dd3bd6a743b37d4ddafab624cef43748ca1c1a
      Gerrit-Change-Number: 7698742
      Gerrit-PatchSet: 4
      Gerrit-Owner: Scott Haseley <shas...@chromium.org>
      Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
      Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
      Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
      Gerrit-Attention: Mingyu Lei <le...@chromium.org>
      Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
      Gerrit-Comment-Date: Mon, 30 Mar 2026 20:20:02 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Mingyu Lei <le...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mingyu Lei (Gerrit)

      unread,
      Mar 30, 2026, 11:27:26 PM (3 days ago) Mar 30
      to Scott Haseley, Kouhei Ueno, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
      Attention needed from Kouhei Ueno and Scott Haseley

      Mingyu Lei voted and added 1 comment

      Votes added by Mingyu Lei

      Code-Review+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 4 (Latest):
      Mingyu Lei . resolved

      Thanks!

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Kouhei Ueno
      • Scott Haseley
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • 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: I58dd3bd6a743b37d4ddafab624cef43748ca1c1a
        Gerrit-Change-Number: 7698742
        Gerrit-PatchSet: 4
        Gerrit-Owner: Scott Haseley <shas...@chromium.org>
        Gerrit-Reviewer: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        Gerrit-Attention: Scott Haseley <shas...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Comment-Date: Tue, 31 Mar 2026 03:26:50 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Scott Haseley (Gerrit)

        unread,
        Apr 1, 2026, 1:40:21 PM (yesterday) Apr 1
        to Kouhei Ueno, Mingyu Lei, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
        Attention needed from Kouhei Ueno

        Scott Haseley voted and added 1 comment

        Votes added by Scott Haseley

        Commit-Queue+2

        1 comment

        Patchset-level comments
        File-level comment, Patchset 5 (Latest):
        Scott Haseley . resolved

        Thanks for reviewing! Going to land this.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Kouhei Ueno
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • 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: I58dd3bd6a743b37d4ddafab624cef43748ca1c1a
        Gerrit-Change-Number: 7698742
        Gerrit-PatchSet: 5
        Gerrit-Owner: Scott Haseley <shas...@chromium.org>
        Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        Gerrit-CC: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Comment-Date: Wed, 01 Apr 2026 17:40:12 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Scott Haseley (Gerrit)

        unread,
        Apr 1, 2026, 4:34:00 PM (22 hours ago) Apr 1
        to Kouhei Ueno, Mingyu Lei, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org
        Attention needed from Kouhei Ueno

        Scott Haseley voted Commit-Queue+2

        Commit-Queue+2
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Kouhei Ueno
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • 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: I58dd3bd6a743b37d4ddafab624cef43748ca1c1a
        Gerrit-Change-Number: 7698742
        Gerrit-PatchSet: 5
        Gerrit-Owner: Scott Haseley <shas...@chromium.org>
        Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        Gerrit-CC: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Attention: Kouhei Ueno <kou...@chromium.org>
        Gerrit-Comment-Date: Wed, 01 Apr 2026 20:33:49 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Apr 1, 2026, 5:53:56 PM (21 hours ago) Apr 1
        to Scott Haseley, Kouhei Ueno, Mingyu Lei, chromium...@chromium.org, blink-...@chromium.org, chikamu...@chromium.org, kinuko...@chromium.org, scheduler-...@chromium.org

        Chromium LUCI CQ submitted the change

        Unreviewed changes

        4 is the latest approved patch-set.
        No files were changed between the latest approved patch-set and the submitted one.

        Change information

        Commit message:
        Scheduling APIs: Make web scheduling queues pausable

        The `NonMainThreadTaskQueue`s used by scheduler.postTask() and
        scheduler.yield() are not tracked in `WorkerSchedulerImpl`'s list of
        task queues, so they are not subject to pausing for BFCache or virtual
        time. This CL fixes that.

        Notes:
        - Similar to the main thread, the web scheduling queues unregister
        themselves during destruction so the map entry can be cleared.

        - Testing: I borrowed and modified one of the SharedWorker tests to
        test BFCache. This test fails without the fix. I also added a few
        unit tests for pausing and shutdown.

        - This also does a drive-by fix converting std::map to HashMap. We
        use a HashMap for the equivalent map on the main thread side, and
        AFAIK there isn't any reason this needs to be a std::map.
        Bug: 493222148
        Change-Id: I58dd3bd6a743b37d4ddafab624cef43748ca1c1a
        Commit-Queue: Scott Haseley <shas...@chromium.org>
        Reviewed-by: Mingyu Lei <le...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1608791}
        Files:
        • M third_party/blink/renderer/platform/scheduler/worker/non_main_thread_web_scheduling_task_queue_impl.cc
        • M third_party/blink/renderer/platform/scheduler/worker/non_main_thread_web_scheduling_task_queue_impl.h
        • M third_party/blink/renderer/platform/scheduler/worker/worker_scheduler_impl.cc
        • M third_party/blink/renderer/platform/scheduler/worker/worker_scheduler_impl.h
        • M third_party/blink/renderer/platform/scheduler/worker/worker_scheduler_impl_unittest.cc
        • A third_party/blink/web_tests/wpt_internal/scheduler/back-forward-cache/post-task-pause-dedicated-worker.window.js
        • A third_party/blink/web_tests/wpt_internal/scheduler/back-forward-cache/resources/timestamp-worker.js
        Change size: M
        Delta: 7 files changed, 201 insertions(+), 35 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Mingyu Lei
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I58dd3bd6a743b37d4ddafab624cef43748ca1c1a
        Gerrit-Change-Number: 7698742
        Gerrit-PatchSet: 6
        Gerrit-Owner: Scott Haseley <shas...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Scott Haseley <shas...@chromium.org>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages