From f5ed21484ff1609b847c4e477b86a6bc67d151c9 Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Wed, 21 Mar 2012 23:41:05 +0000 Subject: Fix crash caused by r127767 due to undefined order of argument parsing. Previous ScreenRecorder was calling .get() and .Pass() for the same scoped_ptr variable in one function call. These calls were executed in undefined order, so it was crashing when compiled with GCC or VC, but not with clang. Review URL: https://chromiumcodereview.appspot.com/9815031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128102 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/host/screen_recorder.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'remoting/host/screen_recorder.cc') diff --git a/remoting/host/screen_recorder.cc b/remoting/host/screen_recorder.cc index 7b0a886..96897a3 100644 --- a/remoting/host/screen_recorder.cc +++ b/remoting/host/screen_recorder.cc @@ -240,10 +240,12 @@ void ScreenRecorder::DoSendVideoPacket(scoped_ptr packet) { if (network_stopped_ || connections_.empty()) return; + VideoPacket* packet_ptr = packet.get(); + // TODO(sergeyu): Currently we send the data only to the first // connection. Send it to all connections if necessary. connections_.front()->video_stub()->ProcessVideoPacket( - packet.get(), base::Bind( + packet_ptr, base::Bind( &ScreenRecorder::VideoPacketSentCallback, this, base::Passed(packet.Pass()))); } -- cgit v1.1