summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 23:35:47 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 23:35:47 +0000
commit0d7e79fa8ce1bef5ca6d413c908c267c35f5867a (patch)
tree5509297bccd2e1b4c8abd0680090547c4b707f18 /media
parentf94151690a90af7029a1ab6ddb0f7679af3a9c7d (diff)
downloadchromium_src-0d7e79fa8ce1bef5ca6d413c908c267c35f5867a.zip
chromium_src-0d7e79fa8ce1bef5ca6d413c908c267c35f5867a.tar.gz
chromium_src-0d7e79fa8ce1bef5ca6d413c908c267c35f5867a.tar.bz2
Revert 61899 for breaking cookes on file:// URLs.
BUG=58553 ================================================= Fix instances of passing raw pointers to RefCounted objects in tasks. Some of these manually handled it correctly by using AddRef()/Release() pairs. I switched them to make_scoped_refptr() to be more consistent. This also makes them cleanup properly on MessageLoop shutdown if we start deleting tasks. BUG=28083 TEST=builds Review URL: http://codereview.chromium.org/3581008 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/3654001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62043 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/pipeline_impl.cc8
-rw-r--r--media/filters/decoder_base.h13
-rw-r--r--media/filters/ffmpeg_demuxer.cc7
-rw-r--r--media/filters/ffmpeg_video_decoder.cc11
-rw-r--r--media/filters/omx_video_decoder.cc2
5 files changed, 14 insertions, 27 deletions
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc
index 5d7759c..bd9e9fe 100644
--- a/media/base/pipeline_impl.cc
+++ b/media/base/pipeline_impl.cc
@@ -93,12 +93,8 @@ bool PipelineImpl::Start(FilterFactory* factory,
// Kick off initialization!
running_ = true;
- message_loop_->PostTask(
- FROM_HERE,
- NewRunnableMethod(this,
- &PipelineImpl::StartTask,
- make_scoped_refptr(factory),
- url,
+ message_loop_->PostTask(FROM_HERE,
+ NewRunnableMethod(this, &PipelineImpl::StartTask, factory, url,
callback.release()));
return true;
}
diff --git a/media/filters/decoder_base.h b/media/filters/decoder_base.h
index 355bb06..60245ed 100644
--- a/media/filters/decoder_base.h
+++ b/media/filters/decoder_base.h
@@ -30,26 +30,21 @@ class DecoderBase : public Decoder {
// MediaFilter implementation.
virtual void Stop(FilterCallback* callback) {
- this->message_loop()->PostTask(
- FROM_HERE,
+ this->message_loop()->PostTask(FROM_HERE,
NewRunnableMethod(this, &DecoderBase::StopTask, callback));
}
virtual void Seek(base::TimeDelta time,
FilterCallback* callback) {
- this->message_loop()->PostTask(
- FROM_HERE,
+ this->message_loop()->PostTask(FROM_HERE,
NewRunnableMethod(this, &DecoderBase::SeekTask, time, callback));
}
// Decoder implementation.
virtual void Initialize(DemuxerStream* demuxer_stream,
FilterCallback* callback) {
- this->message_loop()->PostTask(
- FROM_HERE,
- NewRunnableMethod(this,
- &DecoderBase::InitializeTask,
- make_scoped_refptr(demuxer_stream),
+ this->message_loop()->PostTask(FROM_HERE,
+ NewRunnableMethod(this, &DecoderBase::InitializeTask, demuxer_stream,
callback));
}
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 5869e3a..797481b 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -310,11 +310,8 @@ void FFmpegDemuxer::OnAudioRendererDisabled() {
void FFmpegDemuxer::Initialize(DataSource* data_source,
FilterCallback* callback) {
- message_loop()->PostTask(
- FROM_HERE,
- NewRunnableMethod(this,
- &FFmpegDemuxer::InitializeTask,
- make_scoped_refptr(data_source),
+ message_loop()->PostTask(FROM_HERE,
+ NewRunnableMethod(this, &FFmpegDemuxer::InitializeTask, data_source,
callback));
}
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index 73deb74..c79f679 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -36,12 +36,11 @@ FFmpegVideoDecoder::~FFmpegVideoDecoder() {
void FFmpegVideoDecoder::Initialize(DemuxerStream* demuxer_stream,
FilterCallback* callback) {
if (MessageLoop::current() != message_loop()) {
- message_loop()->PostTask(
- FROM_HERE,
- NewRunnableMethod(this,
- &FFmpegVideoDecoder::Initialize,
- make_scoped_refptr(demuxer_stream),
- callback));
+ message_loop()->PostTask(FROM_HERE,
+ NewRunnableMethod(this,
+ &FFmpegVideoDecoder::Initialize,
+ demuxer_stream,
+ callback));
return;
}
diff --git a/media/filters/omx_video_decoder.cc b/media/filters/omx_video_decoder.cc
index 178a29c..82793de 100644
--- a/media/filters/omx_video_decoder.cc
+++ b/media/filters/omx_video_decoder.cc
@@ -57,7 +57,7 @@ void OmxVideoDecoder::Initialize(DemuxerStream* demuxer_stream,
FROM_HERE,
NewRunnableMethod(this,
&OmxVideoDecoder::Initialize,
- make_scoped_refptr(demuxer_stream),
+ demuxer_stream,
callback));
return;
}