| 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 a607071a509467b927a98756cbb477121cffbc0f..0d9e56ac1ee1e9bb64e10f7814fe4bdc185100f3 100644
|
| --- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
|
| +++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
|
| @@ -632,6 +632,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();
|
| }
|
| @@ -888,7 +892,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();
|
|
|