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

Unified Diff: media/base/pipeline.cc

Issue 10855167: Downgrade media::Pipeline CHECKs into NOTREACHED() + no-op. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 8559bd1561062fdff1db021357d6589d8a66897b..a4bfd29bb2fef2c31d42751b6c9681735e925ca2 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -110,7 +110,10 @@ void Pipeline::Start(scoped_ptr<FilterCollection> collection,
const PipelineStatusCB& error_cb,
const PipelineStatusCB& start_cb) {
base::AutoLock auto_lock(lock_);
- CHECK(!running_) << "Media pipeline is already running";
+ if (running_) {
Ami GONE FROM CHROMIUM 2012/08/15 05:08:11 wait, what? How can this happen?
scherkus (not reviewing) 2012/08/15 05:08:59 being silly (i.e., calling Start() twice)
+ NOTREACHED() << "Media pipeline is already running";
+ return;
+ }
running_ = true;
message_loop_->PostTask(FROM_HERE, base::Bind(
@@ -126,7 +129,10 @@ void Pipeline::Stop(const base::Closure& stop_cb) {
void Pipeline::Seek(TimeDelta time, const PipelineStatusCB& seek_cb) {
base::AutoLock auto_lock(lock_);
- CHECK(running_) << "Media pipeline isn't running";
+ if (!running_) {
+ NOTREACHED() << "Media pipeline isn't running";
+ return;
+ }
message_loop_->PostTask(FROM_HERE, base::Bind(
&Pipeline::SeekTask, this, time, seek_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