RenderThreadImpl::PostTaskToAllWebWorkers() doesn't post a task to all workers |
|||||
Issue descriptionTHIS 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
,
Oct 13 2017
nhiroki: is this bug still valid?
,
Oct 20 2017
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.
,
Jun 12 2018
,
Oct 30
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 |
|||||
Comment 1 by sheriffbot@chromium.org
, Oct 12 2017Status: Untriaged (was: Available)