summaryrefslogtreecommitdiffstats
path: root/webkit/glue/media
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 23:40:37 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 23:40:37 +0000
commit8df2d1f8dde16442af61f6203acdf03ce4dc8879 (patch)
treef1ced25cffbd6b453e1810acd5cf8606dd7ea07d /webkit/glue/media
parent7d59ee27d5a18e78ac732e559549311895be0eb5 (diff)
downloadchromium_src-8df2d1f8dde16442af61f6203acdf03ce4dc8879.zip
chromium_src-8df2d1f8dde16442af61f6203acdf03ce4dc8879.tar.gz
chromium_src-8df2d1f8dde16442af61f6203acdf03ce4dc8879.tar.bz2
Fixing a bug in SimpleDataSource
SimpleDataSource might be stopped before StartTask is called, so handle this case. Review URL: http://codereview.chromium.org/125278 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18668 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/media')
-rw-r--r--webkit/glue/media/simple_data_source.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/webkit/glue/media/simple_data_source.cc b/webkit/glue/media/simple_data_source.cc
index 7cc541f..a9daf10 100644
--- a/webkit/glue/media/simple_data_source.cc
+++ b/webkit/glue/media/simple_data_source.cc
@@ -152,6 +152,11 @@ void SimpleDataSource::SetURL(const GURL& url) {
void SimpleDataSource::StartTask() {
AutoLock auto_lock(lock_);
DCHECK(MessageLoop::current() == render_loop_);
+
+ // We may have stopped.
+ if (state_ == STOPPED)
+ return;
+
DCHECK_EQ(state_, INITIALIZING);
// Create our bridge and start loading the resource.