| Index: content/common/gpu/media/video_decode_accelerator_unittest.cc
|
| diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc
|
| index 87f4d0aa711d84b74dfc0141ae3c6e2f30214efc..913396688672ade9484b0b05238e64d005ba37fa 100644
|
| --- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
|
| +++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
|
| @@ -540,6 +540,10 @@ void GLRenderingVDAClient::CreateAndStartDecoder() {
|
| decoder_->TryToSetupDecodeOnSeparateThread(
|
| weak_this_, base::ThreadTaskRunnerHandle::Get());
|
|
|
| + weak_vda_ptr_factory_.reset(
|
| + new base::WeakPtrFactory<VideoDecodeAccelerator>(decoder_.get()));
|
| + weak_vda_ = weak_vda_ptr_factory_->GetWeakPtr();
|
| +
|
| SetState(CS_DECODER_SET);
|
| FinishInitialization();
|
| }
|
| @@ -771,7 +775,7 @@ void GLRenderingVDAClient::FinishInitialization() {
|
| void GLRenderingVDAClient::DeleteDecoder() {
|
| if (decoder_deleted())
|
| return;
|
| - weak_vda_ptr_factory_.reset();
|
| + weak_vda_ptr_factory_->InvalidateWeakPtrs();
|
| decoder_.reset();
|
| STLClearObject(&encoded_data_);
|
| active_textures_.clear();
|
|
|