| Index: mojo/edk/system/handle.h
|
| diff --git a/mojo/edk/system/handle.h b/mojo/edk/system/handle.h
|
| index df7fac2753a03adda9b4a0c212250fdbe92bf58d..c02fa1d974702bfcc750fbffe76c071a33b33f92 100644
|
| --- a/mojo/edk/system/handle.h
|
| +++ b/mojo/edk/system/handle.h
|
| @@ -32,9 +32,20 @@ struct Handle {
|
| Handle& operator=(const Handle&);
|
| Handle& operator=(Handle&&);
|
|
|
| + // Returns a new |Handle| with the same contents as this object. Useful when a
|
| + // function takes a |Handle&&| argument and the caller wants to retain its
|
| + // copy (rather than moving it).
|
| + Handle Clone() const { return *this; }
|
| +
|
| // A |Handle| tests as true if it actually has a dispatcher.
|
| explicit operator bool() const { return !!dispatcher; }
|
|
|
| + bool operator==(const Handle& rhs) const {
|
| + return dispatcher == rhs.dispatcher && rights == rhs.rights;
|
| + }
|
| +
|
| + bool operator!=(const Handle& rhs) const { return !operator==(rhs); }
|
| +
|
| void reset() { *this = Handle(); }
|
|
|
| // Note: |dispatcher| is guaranteed to be null if default-constructed or
|
|
|