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

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

Issue 9717021: Make Callback::Reset() return a copy to support use-cases where Run() ends up modifying |*this|. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: base::ResetAndReturn is born. Created 8 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
Index: content/renderer/media/capture_video_decoder.cc
diff --git a/content/renderer/media/capture_video_decoder.cc b/content/renderer/media/capture_video_decoder.cc
index 19371155a9e9e3d23bab57c7864469e401ee2442..97626e61782412fe1d6e1b1464a0b7785f4c43e2 100644
--- a/content/renderer/media/capture_video_decoder.cc
+++ b/content/renderer/media/capture_video_decoder.cc
@@ -5,6 +5,7 @@
#include "content/renderer/media/capture_video_decoder.h"
#include "base/bind.h"
+#include "base/callback_helpers.h"
#include "content/renderer/media/video_capture_impl_manager.h"
#include "media/base/filter_host.h"
#include "media/base/limits.h"
@@ -202,7 +203,7 @@ void CaptureVideoDecoder::OnStoppedOnDecoderThread(
DVLOG(1) << "OnStoppedOnDecoderThread";
DCHECK(message_loop_proxy_->BelongsToCurrentThread());
if (!pending_stop_cb_.is_null())
- media::ResetAndRunCB(&pending_stop_cb_);
+ base::ResetAndReturn(&pending_stop_cb_).Run();
vc_manager_->RemoveDevice(video_stream_id_, this);
}

Powered by Google App Engine
This is Rietveld 408576698