Add WorkerThread to WorkerThreads after context is initialized
This is a follow-up CL of crrev.com/c/1792028. The CL seemed to fix a crash but a better and proper fix is to delay adding WorkerThread to WorkerThreads() until the worker context is initialized. This way we can make sure WorkerScheduler is available for all workers in WorkerThreads(). To terminate initializing workers via TerminateAllWorkersForTesting() we need to keep initializing workers somewhere else. This CL adds a HashSet that keeps initializing workers. Bug: 1000077 Change-Id: I8410ebec0a8459a779105f6d65e2bde4f3b81f20 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1792510 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by:Hiroki Nakagawa <nhiroki@chromium.org> Cr-Commit-Position: refs/heads/master@{#695841}
Showing
Please register or sign in to comment