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

Unified Diff: media/base/android/media_decoder_job.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 | « media/base/android/media_decoder_job.h ('k') | media/base/android/media_player_bridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_decoder_job.cc
diff --git a/media/base/android/media_decoder_job.cc b/media/base/android/media_decoder_job.cc
index 30ee84e5cfd9d0732abf4d93d06f3efdcb64f516..6d01cbfed128e465a8ea452040782c8c43be7d87 100644
--- a/media/base/android/media_decoder_job.cc
+++ b/media/base/android/media_decoder_job.cc
@@ -31,13 +31,12 @@ MediaDecoderJob::MediaDecoderJob(
output_eos_encountered_(false),
skip_eos_enqueue_(true),
prerolling_(true),
- weak_this_(this),
request_data_cb_(request_data_cb),
access_unit_index_(0),
input_buf_index_(-1),
stop_decode_pending_(false),
- destroy_pending_(false) {
-}
+ destroy_pending_(false),
+ weak_factory_(this) {}
MediaDecoderJob::~MediaDecoderJob() {}
@@ -362,7 +361,10 @@ void MediaDecoderJob::DecodeInternal(
decoder_task_runner_->PostDelayedTask(
FROM_HERE,
base::Bind(&MediaDecoderJob::ReleaseOutputBuffer,
- weak_this_.GetWeakPtr(), buffer_index, size, render_output,
+ weak_factory_.GetWeakPtr(),
+ buffer_index,
+ size,
+ render_output,
base::Bind(callback, status, presentation_timestamp)),
time_to_render);
return;
« no previous file with comments | « media/base/android/media_decoder_job.h ('k') | media/base/android/media_player_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698