New issue
Advanced search Search tips

Issue 655028 link

Starred by 1 user

Issue metadata

Status: Closed
Owner: ----
Closed: Oct 30
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

RenderThreadImpl::PostTaskToAllWebWorkers() doesn't post a task to all workers

Project Member Reported by nhiroki@chromium.org, Oct 12 2016

Issue description

THIS IS COPIED FROM https://codereview.chromium.org/2402983002/diff/40001/third_party/WebKit/Source/core/workers/WorkerBackingThread.h#newcode72


Apparently, PostTaskToAllWebWorkers() doesn't post a task to WorkerBackingThreads that don't own a platform thread. AnimationWorklet/AudioWorklet/CompositorWorker are such cases and these haven't been shipped yet, so this is not a real problem. We may need to fix it before shipping them.

=== Details ===

WorkerBackingThread creates and owns a dedicated platform thread for typical workers, but it doesn't create a thread and instead borrows an existing platform thread for some special workers (e.g. CompositorWorker is hosted on the existing compositor thread[1]). Note that these special workers have NOT been shipped yet.

WorkerThreadRegistry::PostTaskToAllThreads() posts a task to |task_runner_map_|. This map is updated on WorkerThreadRegistry::DidStartCurrentWorkerThread()[2]. This is called from WorkerBackingThread::initialize() only when WorkerBackingThread owns a platform thread[3].

[1]
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/compositorworker/AbstractAnimationWorkletThread.cpp?sq=package:chromium&dr=CSs&rcl=1476228066&l=65
[2]
https://cs.chromium.org/chromium/src/content/child/worker_thread_registry.cc?type=cs&sq=package:chromium&l=97
[3]
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp?sq=package:chromium&dr=CSs&l=79
 
Project Member

Comment 1 by sheriffbot@chromium.org, Oct 12 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 2 by falken@chromium.org, Oct 13 2017

Cc: nhiroki@chromium.org
nhiroki: is this bug still valid?
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)
Yes, this is still valid.

Random notes
- This function is used only for collecting resource usage (heap size of V8 Isolates) on worker threads.
- TimeZoneMonitorClient::OnTimeZoneChange() does the similar thing. It posts tasks to WorkerBackingThreads (Isolates), not WorkerThreads. We could unify them into one helper function.
Labels: WorkerBacklog
Status: Closed (was: Available)
Let me close this issue.

> Apparently, PostTaskToAllWebWorkers() doesn't post a task to WorkerBackingThreads that don't own a platform thread. AnimationWorklet/AudioWorklet/CompositorWorker are such cases and these haven't been shipped yet, so this is not a real problem. We may need to fix it before shipping them.

AnimationWorklet and AudioWorklet now run on threads owned by WorkerBackingThread, so PostTaskToAllWebWorkers() correctly posts a task to them, too.

Sign in to add a comment