Worker: Capture worker task runners on worker scheduler initialization
Before this CL, WorkerThread::GetTaskRunner() took a task runner from the worker scheduler on demand. The worker scheduler is disposed of during worker termination, so GetTaskRunner() must not be called after worker termination starts. Unfortunately it is difficult to enforce the rule everywhere, and this caused issues like https://crbug.com/1104046. To fix this, this CL captures all task runners on worker scheduler initialization, and WorkerThread::GetTaskRunner() return the captured task runner instead of accessing the worker scheduler to create a new task runner. Bug: 1112191 Change-Id: Ic39a515272e77fc3fb2c94ae842a89b15a78466c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2342236Reviewed-by:Kenichi Ishibashi <bashi@chromium.org> Reviewed-by:
Alexander Timin <altimin@chromium.org> Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org> Cr-Commit-Position: refs/heads/master@{#799009}
Showing
Please register or sign in to comment