commit | 90c3b90d0d0f5983d7a80bee74aa835656df1340 | [log] [tgz] |
---|---|---|
author | François Doray <fdoray@chromium.org> | Thu Jan 30 00:59:10 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Jan 30 00:59:10 2025 |
tree | 1a82bc256e0cde5bb72c82f7c2349e9c052ba51f | |
parent | c86140a08bd922b2eb33c48325c2fe0ba9855733 [diff] |
[blink] Remove cancelled scheduler idle tasks when many are accumulated. With this CL, ScriptedIdleTaskController counts its outstanding scheduler idle tasks. When many more than the number of "non-cancelled" IdleTasks are accumulated, it invokes a new method on ThreadScheduler which traverses the queues of idle tasks and remove those that are cancelled. The impact is that this code does not cause an Out of Memory (OOM) crash anymore: let noop = () => {} let postAndCancel = () => { let id = window.requestIdleCallback(noop); window.cancelIdleCallback(id); scheduler.postTask(postAndCancel); } postAndCancel(); Bug: 365114039 Change-Id: Id44b773bb54a2bd70a467ebef54142f6dc7c5b42 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6205406 Reviewed-by: Etienne Pierre-Doray <etiennep@chromium.org> Auto-Submit: Francois Pierre Doray <fdoray@chromium.org> Commit-Queue: Francois Pierre Doray <fdoray@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/main@{#1413248}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.