summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 23:41:05 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 23:41:05 +0000
commitf5ed21484ff1609b847c4e477b86a6bc67d151c9 (patch)
tree814901a352dd65a8294d67abbf598b39888f0541 /remoting
parent4646e528cc475fe8d68fcae85cf176c608aa4649 (diff)
downloadchromium_src-f5ed21484ff1609b847c4e477b86a6bc67d151c9.zip
chromium_src-f5ed21484ff1609b847c4e477b86a6bc67d151c9.tar.gz
chromium_src-f5ed21484ff1609b847c4e477b86a6bc67d151c9.tar.bz2
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
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/screen_recorder.cc4
1 files changed, 3 insertions, 1 deletions
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<VideoPacket> 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())));
}