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

Unified Diff: content/renderer/media/rtc_video_encoder.cc

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 9 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 | « content/renderer/media/rtc_video_encoder.h ('k') | content/renderer/media/video_capture_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_encoder.cc
diff --git a/content/renderer/media/rtc_video_encoder.cc b/content/renderer/media/rtc_video_encoder.cc
index f59e0bfeb5f51afbd87428d462ed8143b75ebcb3..97d34ff66f84271bb623016eccccf7eb7b450c8c 100644
--- a/content/renderer/media/rtc_video_encoder.cc
+++ b/content/renderer/media/rtc_video_encoder.cc
@@ -512,7 +512,7 @@ RTCVideoEncoder::RTCVideoEncoder(
gpu_factories_(gpu_factories),
encoded_image_callback_(NULL),
impl_status_(WEBRTC_VIDEO_CODEC_UNINITIALIZED),
- weak_this_factory_(this) {
+ weak_factory_(this) {
DVLOG(1) << "RTCVideoEncoder(): profile=" << profile;
}
@@ -532,8 +532,8 @@ int32_t RTCVideoEncoder::InitEncode(const webrtc::VideoCodec* codec_settings,
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!impl_);
- weak_this_factory_.InvalidateWeakPtrs();
- impl_ = new Impl(weak_this_factory_.GetWeakPtr(), gpu_factories_);
+ weak_factory_.InvalidateWeakPtrs();
+ impl_ = new Impl(weak_factory_.GetWeakPtr(), gpu_factories_);
base::WaitableEvent initialization_waiter(true, false);
int32_t initialization_retval = WEBRTC_VIDEO_CODEC_UNINITIALIZED;
gpu_factories_->GetTaskRunner()->PostTask(
@@ -602,7 +602,7 @@ int32_t RTCVideoEncoder::Release() {
gpu_factories_->GetTaskRunner()->PostTask(
FROM_HERE, base::Bind(&RTCVideoEncoder::Impl::Destroy, impl_));
impl_ = NULL;
- weak_this_factory_.InvalidateWeakPtrs();
+ weak_factory_.InvalidateWeakPtrs();
impl_status_ = WEBRTC_VIDEO_CODEC_UNINITIALIZED;
}
return WEBRTC_VIDEO_CODEC_OK;
« no previous file with comments | « content/renderer/media/rtc_video_encoder.h ('k') | content/renderer/media/video_capture_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698