Index: media/blink/multibuffer_data_source.cc |
diff --git a/media/blink/multibuffer_data_source.cc b/media/blink/multibuffer_data_source.cc |
index 9c776f5b3f8e35c0c2851efa4b81286eff79b914..12988760708722d172f608cb83d3bb109ce8bff5 100644 |
--- a/media/blink/multibuffer_data_source.cc |
+++ b/media/blink/multibuffer_data_source.cc |
@@ -248,8 +248,10 @@ void MultibufferDataSource::SetBufferingStrategy( |
bool MultibufferDataSource::HasSingleOrigin() { |
DCHECK(render_task_runner_->BelongsToCurrentThread()); |
- DCHECK(init_cb_.is_null() && reader_.get()) |
- << "Initialize() must complete before calling HasSingleOrigin()"; |
+ // Before initialization completes there is no risk of leaking data. Callers |
+ // are required to order checks such that this isn't a race. |
+ if (!init_cb_.is_null()) |
+ return true; |
hubbe
2016/09/13 22:43:23
single_origin_ defaults to true, so this if statem
sandersd (OOO until July 31)
2016/09/13 22:50:37
But now it looks like it took me seconds to make t
|
return single_origin_; |
} |