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

Unified Diff: media/base/pipeline_unittest.cc

Issue 444333007: Pipeline: Invalidate weak pointers before returning stop callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add HasWeakPtrsForTesting Created 6 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 | « media/base/pipeline.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_unittest.cc
diff --git a/media/base/pipeline_unittest.cc b/media/base/pipeline_unittest.cc
index 412fd88bafd836fd51371eaefdf3922d42126ad3..4eb84f62c3f98eaa88a37c0dca1a1674527e546a 100644
--- a/media/base/pipeline_unittest.cc
+++ b/media/base/pipeline_unittest.cc
@@ -315,6 +315,9 @@ class PipelineTest : public ::testing::Test {
}
void DestroyPipeline() {
+ // In real code Pipeline could be destroyed on a different thread. All weak
+ // pointers must have been invalidated before the stop callback returns.
+ DCHECK(!pipeline_->HasWeakPtrsForTesting());
pipeline_.reset();
}
« no previous file with comments | « media/base/pipeline.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698