Worker: Refine state management of WorkerThread
This CL... 1) introduces ThreadState enum that represents a state of the worker thread, 2) stops accessing |m_globalScope| from the main thread for detecting worker thread initialization and instead checks ThreadState, 3) renames |m_started| and |m_terminated| with |m_requestedToStart| and |m_requestedToTerminate| in order to emphasize that these fields represent not a state of the worker thread but facts that the worker thread has been requested to start/terminate from the main thread, and 4) removes mention of |m_microtaskRunner| from a comment about |m_threadStateMutex| because the member is accessed only from the worker thread. BUG=638877, 640843 Review-Url: https://codereview.chromium.org/2268183005 Cr-Commit-Position: refs/heads/master@{#414336}
Showing
This diff is collapsed.
Please register or sign in to comment