OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 void performShutdownOnWorkerThread(); | 134 void performShutdownOnWorkerThread(); |
135 void performTaskOnWorkerThread(std::unique_ptr<ExecutionContextTask>, bool i
sInstrumented); | 135 void performTaskOnWorkerThread(std::unique_ptr<ExecutionContextTask>, bool i
sInstrumented); |
136 void runDebuggerTaskOnWorkerThread(std::unique_ptr<CrossThreadClosure>); | 136 void runDebuggerTaskOnWorkerThread(std::unique_ptr<CrossThreadClosure>); |
137 void runDebuggerTaskDontWaitOnWorkerThread(); | 137 void runDebuggerTaskDontWaitOnWorkerThread(); |
138 | 138 |
139 bool m_started = false; | 139 bool m_started = false; |
140 bool m_terminated = false; | 140 bool m_terminated = false; |
141 bool m_readyToShutdown = false; | 141 bool m_readyToShutdown = false; |
142 bool m_pausedInDebugger = false; | 142 bool m_pausedInDebugger = false; |
143 bool m_runningDebuggerTask = false; | 143 bool m_runningDebuggerTask = false; |
144 bool m_shouldTerminateV8Execution = false; | |
145 | 144 |
146 OwnPtr<InspectorTaskRunner> m_inspectorTaskRunner; | 145 OwnPtr<InspectorTaskRunner> m_inspectorTaskRunner; |
147 OwnPtr<WorkerMicrotaskRunner> m_microtaskRunner; | 146 OwnPtr<WorkerMicrotaskRunner> m_microtaskRunner; |
148 | 147 |
149 RefPtr<WorkerLoaderProxy> m_workerLoaderProxy; | 148 RefPtr<WorkerLoaderProxy> m_workerLoaderProxy; |
150 WorkerReportingProxy& m_workerReportingProxy; | 149 WorkerReportingProxy& m_workerReportingProxy; |
151 | 150 |
152 // This lock protects |m_workerGlobalScope|, |m_terminated|, | 151 // This lock protects |m_workerGlobalScope|, |m_terminated|, |
153 // |m_readyToShutdown|, |m_runningDebuggerTask|, | 152 // |m_readyToShutdown|, |m_runningDebuggerTask| and |m_microtaskRunner|. |
154 // |m_shouldTerminateV8Execution| and |m_microtaskRunner|. | |
155 Mutex m_threadStateMutex; | 153 Mutex m_threadStateMutex; |
156 | 154 |
157 Persistent<WorkerGlobalScope> m_workerGlobalScope; | 155 Persistent<WorkerGlobalScope> m_workerGlobalScope; |
158 | 156 |
159 // Signaled when the thread starts termination on the main thread. | 157 // Signaled when the thread starts termination on the main thread. |
160 OwnPtr<WaitableEvent> m_terminationEvent; | 158 OwnPtr<WaitableEvent> m_terminationEvent; |
161 | 159 |
162 // Signaled when the thread completes termination on the worker thread. | 160 // Signaled when the thread completes termination on the worker thread. |
163 OwnPtr<WaitableEvent> m_shutdownEvent; | 161 OwnPtr<WaitableEvent> m_shutdownEvent; |
164 }; | 162 }; |
165 | 163 |
166 } // namespace blink | 164 } // namespace blink |
167 | 165 |
168 #endif // WorkerThread_h | 166 #endif // WorkerThread_h |
OLD | NEW |