| 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 ForciblyTerminateExecution(lock, ExitCode::kSyncForciblyTerminated); | 341 ForciblyTerminateExecution(lock, ExitCode::kSyncForciblyTerminated); |
| 342 break; | 342 break; |
| 343 case TerminationMode::kGraceful: | 343 case TerminationMode::kGraceful: |
| 344 DCHECK(!forcible_termination_task_handle_.IsActive()); | 344 DCHECK(!forcible_termination_task_handle_.IsActive()); |
| 345 forcible_termination_task_handle_ = | 345 forcible_termination_task_handle_ = |
| 346 parent_frame_task_runners_->Get(TaskType::kUnspecedTimer) | 346 parent_frame_task_runners_->Get(TaskType::kUnspecedTimer) |
| 347 ->PostDelayedCancellableTask( | 347 ->PostDelayedCancellableTask( |
| 348 BLINK_FROM_HERE, | 348 BLINK_FROM_HERE, |
| 349 WTF::Bind(&WorkerThread::MayForciblyTerminateExecution, | 349 WTF::Bind(&WorkerThread::MayForciblyTerminateExecution, |
| 350 WTF::Unretained(this)), | 350 WTF::Unretained(this)), |
| 351 forcible_termination_delay_in_ms_); | 351 TimeDelta::FromMilliseconds( |
| 352 forcible_termination_delay_in_ms_)); |
| 352 break; | 353 break; |
| 353 } | 354 } |
| 354 } | 355 } |
| 355 } | 356 } |
| 356 | 357 |
| 357 worker_thread_lifecycle_context_->NotifyContextDestroyed(); | 358 worker_thread_lifecycle_context_->NotifyContextDestroyed(); |
| 358 inspector_task_runner_->Kill(); | 359 inspector_task_runner_->Kill(); |
| 359 | 360 |
| 360 GetWorkerBackingThread().BackingThread().PostTask( | 361 GetWorkerBackingThread().BackingThread().PostTask( |
| 361 BLINK_FROM_HERE, | 362 BLINK_FROM_HERE, |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 MutexLocker lock(thread_state_mutex_); | 640 MutexLocker lock(thread_state_mutex_); |
| 640 return requested_to_terminate_; | 641 return requested_to_terminate_; |
| 641 } | 642 } |
| 642 | 643 |
| 643 ExitCode WorkerThread::GetExitCodeForTesting() { | 644 ExitCode WorkerThread::GetExitCodeForTesting() { |
| 644 MutexLocker lock(thread_state_mutex_); | 645 MutexLocker lock(thread_state_mutex_); |
| 645 return exit_code_; | 646 return exit_code_; |
| 646 } | 647 } |
| 647 | 648 |
| 648 } // namespace blink | 649 } // namespace blink |
| OLD | NEW |