summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/gpu_video_service_host.cc
diff options
context:
space:
mode:
authorjiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 02:15:14 +0000
committerjiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 02:15:14 +0000
commitbc2b5339e29ef57755a24541618b482791a79741 (patch)
tree205ea5d1357127761a2482f4b8d0a3519d9db812 /chrome/renderer/gpu_video_service_host.cc
parent90809de024ac572e6db7265984ea9e13aa2d4075 (diff)
downloadchromium_src-bc2b5339e29ef57755a24541618b482791a79741.zip
chromium_src-bc2b5339e29ef57755a24541618b482791a79741.tar.gz
chromium_src-bc2b5339e29ef57755a24541618b482791a79741.tar.bz2
gpu: GpuVideo*Host stop hold ref pointer to GpuChannelHost.
Singleton is destructed at exit(), we are kind of late to release the last ref count for GpuChannelHost. use raw pointer for now. long term plan is to either forward close() to GpuVideo* or We move our singleton to destruct at ~RenderThread() where message loop is still alive? BUG=53896 TEST=None. Review URL: http://codereview.chromium.org/3232008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58114 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/gpu_video_service_host.cc')
-rw-r--r--chrome/renderer/gpu_video_service_host.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/renderer/gpu_video_service_host.cc b/chrome/renderer/gpu_video_service_host.cc
index 61a2dcd..c80e35d 100644
--- a/chrome/renderer/gpu_video_service_host.cc
+++ b/chrome/renderer/gpu_video_service_host.cc
@@ -9,14 +9,15 @@
#include "chrome/renderer/render_thread.h"
GpuVideoServiceHost::GpuVideoServiceHost()
- : router_(NULL),
+ : channel_host_(NULL),
+ router_(NULL),
message_loop_(NULL) {
memset(&service_info_, 0, sizeof(service_info_));
}
void GpuVideoServiceHost::OnChannelError() {
LOG(ERROR) << "GpuVideoServiceHost::OnChannelError";
- channel_host_.release();
+ channel_host_ = NULL;
router_ = NULL;
}
@@ -32,7 +33,7 @@ scoped_refptr<GpuVideoDecoderHost> GpuVideoServiceHost::CreateVideoDecoder(
GpuVideoDecoderHost::EventHandler* event_handler) {
DCHECK(RenderThread::current());
- if (!channel_host_.get() || !service_info_.service_available_)
+ if (!channel_host_ || !service_info_.service_available_)
return NULL;
GpuVideoDecoderInfoParam param;
@@ -60,7 +61,7 @@ void GpuVideoServiceHost::DestroyVideoDecoder(
scoped_refptr<GpuVideoDecoderHost> gpu_video_decoder_host) {
DCHECK(RenderThread::current());
- if (!channel_host_.get() || !service_info_.service_available_)
+ if (!channel_host_ || !service_info_.service_available_)
return;
DCHECK(gpu_video_decoder_host.get());