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

Unified Diff: media/base/pipeline.h

Issue 423073012: Pipeline: Use WeakPtr for DemuxerHost Calls and Tasks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated unit tests. 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 | « no previous file | media/base/pipeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline.h
diff --git a/media/base/pipeline.h b/media/base/pipeline.h
index 7c79b3f41762b0810d33ad3c9fa740b1e8b15a86..c4e858dfc8348d142bcd0336d030573a1d5ba1e0 100644
--- a/media/base/pipeline.h
+++ b/media/base/pipeline.h
@@ -430,6 +430,11 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<Pipeline> weak_factory_;
+ // Demuxer calls can be made on the render main thread, where we cannot call
+ // weak_factory_.GetWeakPtr() to get weak pointers. Instead, use a permanent
scherkus (not reviewing) 2014/08/05 18:11:30 you sure about this? I'm fairly certain GetWeakPt
xhwang 2014/08/05 20:44:46 Cool, I didn't know that. Double checked weak_ptr.
+ // weak pointer which will be initialized during the Demuxer initialization.
+ base::WeakPtr<Pipeline> weak_this_for_demuxer_;
+
DISALLOW_COPY_AND_ASSIGN(Pipeline);
};
« no previous file with comments | « no previous file | media/base/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698