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

Unified Diff: media/base/pipeline.cc

Issue 10857018: Upgrade Pipeline::Start() NOTREACHED() back into a CHECK(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: check Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline.cc
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index a4bfd29bb2fef2c31d42751b6c9681735e925ca2..55f8a408f3d392aca5e1065a93954fad5fd49c53 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -110,10 +110,7 @@ void Pipeline::Start(scoped_ptr<FilterCollection> collection,
const PipelineStatusCB& error_cb,
const PipelineStatusCB& start_cb) {
base::AutoLock auto_lock(lock_);
- if (running_) {
- NOTREACHED() << "Media pipeline is already running";
- return;
- }
+ CHECK(!running_) << "Media pipeline is already running";
running_ = true;
message_loop_->PostTask(FROM_HERE, base::Bind(
@@ -556,7 +553,9 @@ void Pipeline::StartTask(scoped_ptr<FilterCollection> filter_collection,
const PipelineStatusCB& error_cb,
const PipelineStatusCB& start_cb) {
DCHECK(message_loop_->BelongsToCurrentThread());
- DCHECK_EQ(kCreated, state_);
+ CHECK_EQ(kCreated, state_)
+ << "Media pipeline cannot be started more than once";
+
filter_collection_ = filter_collection.Pass();
ended_cb_ = ended_cb;
error_cb_ = error_cb;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698