| Index: mojo/edk/embedder/scoped_platform_handle.h
|
| diff --git a/mojo/edk/embedder/scoped_platform_handle.h b/mojo/edk/embedder/scoped_platform_handle.h
|
| index 2919b04622977c69c76d53d72dc431a54074f6b1..0ec99b87dc128f7a9b41f1bdbddcff75552ff0a3 100644
|
| --- a/mojo/edk/embedder/scoped_platform_handle.h
|
| +++ b/mojo/edk/embedder/scoped_platform_handle.h
|
| @@ -14,7 +14,7 @@ namespace mojo {
|
| namespace embedder {
|
|
|
| class MOJO_SYSTEM_IMPL_EXPORT ScopedPlatformHandle {
|
| - MOVE_ONLY_TYPE_FOR_CPP_03(ScopedPlatformHandle, RValue)
|
| + MOVE_ONLY_TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03(ScopedPlatformHandle)
|
|
|
| public:
|
| ScopedPlatformHandle() {}
|
| @@ -22,9 +22,12 @@ class MOJO_SYSTEM_IMPL_EXPORT ScopedPlatformHandle {
|
| ~ScopedPlatformHandle() { handle_.CloseIfNecessary(); }
|
|
|
| // Move-only constructor and operator=.
|
| - ScopedPlatformHandle(RValue other) : handle_(other.object->release()) {}
|
| - ScopedPlatformHandle& operator=(RValue other) {
|
| - handle_ = other.object->release();
|
| + ScopedPlatformHandle(ScopedPlatformHandle&& other)
|
| + : handle_(other.release()) {}
|
| +
|
| + ScopedPlatformHandle& operator=(ScopedPlatformHandle&& other) {
|
| + if (this != &other)
|
| + handle_ = other.release();
|
| return *this;
|
| }
|
|
|
|
|