| 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 ASSERT(m_workerGlobalScope->hasOneRef()); | 338 ASSERT(m_workerGlobalScope->hasOneRef()); |
| 339 #endif | 339 #endif |
| 340 m_workerGlobalScope->dispose(); | 340 m_workerGlobalScope->dispose(); |
| 341 m_workerGlobalScope = nullptr; | 341 m_workerGlobalScope = nullptr; |
| 342 | 342 |
| 343 m_thread->detachGC(); | 343 m_thread->detachGC(); |
| 344 | 344 |
| 345 m_thread->removeTaskObserver(m_microtaskRunner.get()); | 345 m_thread->removeTaskObserver(m_microtaskRunner.get()); |
| 346 m_microtaskRunner = nullptr; | 346 m_microtaskRunner = nullptr; |
| 347 | 347 |
| 348 m_terminationEvent->signal(); | |
| 349 | |
| 350 // Notify the proxy that the WorkerGlobalScope has been disposed of. | 348 // Notify the proxy that the WorkerGlobalScope has been disposed of. |
| 351 // This can free this thread object, hence it must not be touched afterwards
. | 349 // This can free this thread object, hence it must not be touched afterwards
. |
| 352 workerReportingProxy().workerThreadTerminated(); | 350 workerReportingProxy().workerThreadTerminated(); |
| 353 | 351 |
| 352 m_terminationEvent->signal(); |
| 353 |
| 354 // Clean up PlatformThreadData before WTF::WTFThreadData goes away! | 354 // Clean up PlatformThreadData before WTF::WTFThreadData goes away! |
| 355 PlatformThreadData::current().destroy(); | 355 PlatformThreadData::current().destroy(); |
| 356 } | 356 } |
| 357 | 357 |
| 358 class WorkerThreadShutdownFinishTask : public ExecutionContextTask { | 358 class WorkerThreadShutdownFinishTask : public ExecutionContextTask { |
| 359 public: | 359 public: |
| 360 static PassOwnPtr<WorkerThreadShutdownFinishTask> create() | 360 static PassOwnPtr<WorkerThreadShutdownFinishTask> create() |
| 361 { | 361 { |
| 362 return adoptPtr(new WorkerThreadShutdownFinishTask()); | 362 return adoptPtr(new WorkerThreadShutdownFinishTask()); |
| 363 } | 363 } |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); | 523 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); |
| 524 } | 524 } |
| 525 | 525 |
| 526 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) | 526 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke
rInspectorController) |
| 527 { | 527 { |
| 528 MutexLocker locker(m_workerInspectorControllerMutex); | 528 MutexLocker locker(m_workerInspectorControllerMutex); |
| 529 m_workerInspectorController = workerInspectorController; | 529 m_workerInspectorController = workerInspectorController; |
| 530 } | 530 } |
| 531 | 531 |
| 532 } // namespace blink | 532 } // namespace blink |
| OLD | NEW |