Bug 1092010 - part 2 - use move semantics in MessageChannel.cpp; r=dvander
☠☠ backed out by b5703e3ef5de ☠ ☠
authorNathan Froyd <froydnj@mozilla.com>
Fri, 31 Oct 2014 11:21:01 -0400
changeset 213476 a7d4914ea11a1d1d81a3862fc71e003b38a7f06c
parent 213475 f3d36cf13ac10855861b82acd6f82692af675a3f
child 213477 dd73fa918f95b32413017f9b0fbcbc2c3902d66f
push id51241
push usernfroyd@mozilla.com
push dateSat, 01 Nov 2014 02:25:13 +0000
treeherdermozilla-inbound@a7d4914ea11a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1092010
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1092010 - part 2 - use move semantics in MessageChannel.cpp; r=dvander
ipc/glue/MessageChannel.cpp
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -714,17 +714,17 @@ MessageChannel::SendAndWait(Message* aMs
     while (true) {
         // Loop until there aren't any more priority messages to process.
         for (;;) {
             mozilla::Vector<Message> toProcess;
 
             for (MessageQueue::iterator it = mPending.begin(); it != mPending.end(); ) {
                 Message &msg = *it;
                 if (!ShouldDeferMessage(msg)) {
-                    toProcess.append(msg);
+                    toProcess.append(Move(msg));
                     it = mPending.erase(it);
                     continue;
                 }
                 it++;
             }
 
             if (toProcess.empty())
                 break;
@@ -992,17 +992,17 @@ MessageChannel::DequeueOne(Message *recv
     }
 
     if (!mDeferred.empty())
         MaybeUndeferIncall();
 
     if (mPending.empty())
         return false;
 
-    *recvd = mPending.front();
+    *recvd = Move(mPending.front());
     mPending.pop_front();
     return true;
 }
 
 bool
 MessageChannel::OnMaybeDequeueOne()
 {
     AssertWorkerThread();