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

Unified Diff: mojo/edk/system/channel_info.cc

Issue 728553002: Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « mojo/edk/system/channel_info.h ('k') | mojo/edk/system/channel_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel_info.cc
diff --git a/mojo/edk/system/channel_info.cc b/mojo/edk/system/channel_info.cc
index efc5f0409161f51466b3189a9817e936ca936f6f..6d23215e905f1d60decf281a8644431ed22aeaec 100644
--- a/mojo/edk/system/channel_info.cc
+++ b/mojo/edk/system/channel_info.cc
@@ -4,6 +4,8 @@
#include "mojo/edk/system/channel_info.h"
+#include <algorithm>
+
namespace mojo {
namespace system {
@@ -19,5 +21,11 @@ ChannelInfo::ChannelInfo(
ChannelInfo::~ChannelInfo() {
}
+void ChannelInfo::Swap(ChannelInfo* other) {
+ // Note: Swapping avoids refcount churn.
+ std::swap(channel, other->channel);
+ std::swap(channel_thread_task_runner, other->channel_thread_task_runner);
+}
+
} // namespace system
} // namespace mojo
« no previous file with comments | « mojo/edk/system/channel_info.h ('k') | mojo/edk/system/channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698