Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Unified Diff: webkit/media/simple_data_source.cc

Issue 9344003: Fix re-entrancy bug in SimpleDataSource::Abort() introduced in r118338. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/media/simple_data_source.h ('k') | webkit/media/simple_data_source_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/simple_data_source.cc
diff --git a/webkit/media/simple_data_source.cc b/webkit/media/simple_data_source.cc
index b8e13173bef38e8c28341b62346206c0abb4d819..5485027bea6830a12403ebfa2bd1aab0497307b3 100644
--- a/webkit/media/simple_data_source.cc
+++ b/webkit/media/simple_data_source.cc
@@ -270,13 +270,19 @@ void SimpleDataSource::Abort() {
base::AutoLock auto_lock(lock_);
state_ = STOPPED;
initialize_cb_.Reset();
- CancelTask();
+ CancelTask_Locked();
frame_ = NULL;
}
void SimpleDataSource::CancelTask() {
DCHECK(MessageLoop::current() == render_loop_);
base::AutoLock auto_lock(lock_);
+ CancelTask_Locked();
+}
+
+void SimpleDataSource::CancelTask_Locked() {
+ DCHECK(MessageLoop::current() == render_loop_);
+ lock_.AssertAcquired();
DCHECK_EQ(state_, STOPPED);
// Cancel any pending requests.
« no previous file with comments | « webkit/media/simple_data_source.h ('k') | webkit/media/simple_data_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698