| 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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 SafePointScope safePointScope(ThreadState::HeapPointersOnStack); | 314 SafePointScope safePointScope(ThreadState::HeapPointersOnStack); |
| 315 terminateInternal(); | 315 terminateInternal(); |
| 316 } | 316 } |
| 317 | 317 |
| 318 void WorkerThread::terminateAndWait() | 318 void WorkerThread::terminateAndWait() |
| 319 { | 319 { |
| 320 terminate(); | 320 terminate(); |
| 321 m_terminationEvent->wait(); | 321 m_terminationEvent->wait(); |
| 322 } | 322 } |
| 323 | 323 |
| 324 WorkerGlobalScope* WorkerThread::workerGlobalScope() |
| 325 { |
| 326 ASSERT(isCurrentThread()); |
| 327 return m_workerGlobalScope.get(); |
| 328 } |
| 329 |
| 324 bool WorkerThread::terminated() | 330 bool WorkerThread::terminated() |
| 325 { | 331 { |
| 326 MutexLocker lock(m_threadStateMutex); | 332 MutexLocker lock(m_threadStateMutex); |
| 327 return m_terminated; | 333 return m_terminated; |
| 328 } | 334 } |
| 329 | 335 |
| 330 void WorkerThread::terminateInternal() | 336 void WorkerThread::terminateInternal() |
| 331 { | 337 { |
| 332 ASSERT(isMainThread()); | 338 ASSERT(isMainThread()); |
| 333 | 339 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); | 517 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); |
| 512 } | 518 } |
| 513 | 519 |
| 514 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) | 520 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) |
| 515 { | 521 { |
| 516 MutexLocker locker(m_workerInspectorControllerMutex); | 522 MutexLocker locker(m_workerInspectorControllerMutex); |
| 517 m_workerInspectorController = workerInspectorController; | 523 m_workerInspectorController = workerInspectorController; |
| 518 } | 524 } |
| 519 | 525 |
| 520 } // namespace blink | 526 } // namespace blink |
| OLD | NEW |