| Index: mojo/public/cpp/system/handle.h
|
| diff --git a/mojo/public/cpp/system/handle.h b/mojo/public/cpp/system/handle.h
|
| index 211d895d910b39edb286b5c5db75b80b2852da69..0c5adc77aa1f02825ace5845274597130b1387a0 100644
|
| --- a/mojo/public/cpp/system/handle.h
|
| +++ b/mojo/public/cpp/system/handle.h
|
| @@ -84,7 +84,7 @@ namespace mojo {
|
| // like the C++11 |unique_ptr|.
|
| template <class HandleType>
|
| class ScopedHandleBase {
|
| - MOJO_MOVE_ONLY_TYPE_FOR_CPP_03(ScopedHandleBase, RValue)
|
| + MOJO_MOVE_ONLY_TYPE(ScopedHandleBase)
|
|
|
| public:
|
| ScopedHandleBase() {}
|
| @@ -96,11 +96,11 @@ class ScopedHandleBase {
|
| : handle_(other.release()) {}
|
|
|
| // Move-only constructor and operator=.
|
| - ScopedHandleBase(RValue other) : handle_(other.object->release()) {}
|
| - ScopedHandleBase& operator=(RValue other) {
|
| - if (other.object != this) {
|
| + ScopedHandleBase(ScopedHandleBase&& other) : handle_(other.release()) {}
|
| + ScopedHandleBase& operator=(ScopedHandleBase&& other) {
|
| + if (&other != this) {
|
| CloseIfNecessary();
|
| - handle_ = other.object->release();
|
| + handle_ = other.release();
|
| }
|
| return *this;
|
| }
|
|
|