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

Unified Diff: mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc

Issue 1465293002: Mojo C++ bindings: introduce public associated-interface-related types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/public/cpp/bindings/lib/multiplex_router.cc ('k') | mojo/public/cpp/bindings/tests/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc
diff --git a/mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc b/mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc
index 4a2a47bcfb370a63de30b5b446545d8fe17001e4..6f30c9462184f9f43c1c07807d5d25bb7aa91652 100644
--- a/mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc
+++ b/mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc
@@ -35,12 +35,7 @@ ScopedInterfaceEndpointHandle::~ScopedInterfaceEndpointHandle() {
ScopedInterfaceEndpointHandle& ScopedInterfaceEndpointHandle::operator=(
ScopedInterfaceEndpointHandle&& other) {
reset();
-
- id_ = other.id_;
- is_local_ = other.is_local_;
- router_.swap(other.router_);
-
- other.id_ = kInvalidInterfaceId;
+ swap(other);
return *this;
}
@@ -52,6 +47,7 @@ void ScopedInterfaceEndpointHandle::reset() {
router_->CloseEndpointHandle(id_, is_local_);
id_ = kInvalidInterfaceId;
+ is_local_ = true;
router_ = nullptr;
}
@@ -66,6 +62,7 @@ InterfaceId ScopedInterfaceEndpointHandle::release() {
InterfaceId result = id_;
id_ = kInvalidInterfaceId;
+ is_local_ = true;
router_ = nullptr;
return result;
« no previous file with comments | « mojo/public/cpp/bindings/lib/multiplex_router.cc ('k') | mojo/public/cpp/bindings/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698