Fix WorkerThread::TerminateChildThreadsOnWorkerThread

It should call PrepareForShutdownOnWorkerThread() before terminating
child worker threads, and PerformShutdownOnWorkerThread() when all
children are terminated. Due to a clumsy copy-paste after LGTM in
https://chromium-review.googlesource.com/c/chromium/src/+/996554, we
do PerformShutdownOnWorkerThread() twice.

Bug: 829119
Change-Id: I265a68a4f56feed004e3ecc4b32e5ffa9c0d028b
Reviewed-on: https://chromium-review.googlesource.com/1068657
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561143}
1 file changed