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

Unified Diff: media/blink/multibuffer_reader.cc

Issue 2481673004: media: Make sure we transition back to a non-loading state (Closed)
Patch Set: merged Created 4 years, 1 month 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 | « media/blink/multibuffer_data_source_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/multibuffer_reader.cc
diff --git a/media/blink/multibuffer_reader.cc b/media/blink/multibuffer_reader.cc
index 50111aaac7785c47edbd991c179f8adf7a58038d..fa9e84547f3d1cc84d75e3240654ba45e345fa69 100644
--- a/media/blink/multibuffer_reader.cc
+++ b/media/blink/multibuffer_reader.cc
@@ -178,18 +178,13 @@ void MultiBufferReader::NotifyAvailableRange(
}
UpdateInternalState();
if (!progress_callback_.is_null()) {
- // We redirect the call through a weak pointer to ourselves to guarantee
- // there are no callbacks from us after we've been destroyed.
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
- base::Bind(
- &MultiBufferReader::Call, weak_factory_.GetWeakPtr(),
- base::Bind(progress_callback_,
- static_cast<int64_t>(range.begin)
- << multibuffer_->block_size_shift(),
- (static_cast<int64_t>(range.end)
- << multibuffer_->block_size_shift()) +
- multibuffer_->UncommittedBytesAt(range.end))));
+ base::Bind(progress_callback_, static_cast<int64_t>(range.begin)
+ << multibuffer_->block_size_shift(),
+ (static_cast<int64_t>(range.end)
+ << multibuffer_->block_size_shift()) +
+ multibuffer_->UncommittedBytesAt(range.end)));
}
}
« no previous file with comments | « media/blink/multibuffer_data_source_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698