Adopt CAMachPort-as-layer-contents
[WebKit-https.git] / Source / WebCore / platform / cocoa / MachSendRight.h
index 7c02df6cb07b2b90ce8fb02075a33366b3cb0cf0..44c5bcc3d55408ab9ac0ac558518167da2957fd0 100644 (file)
@@ -50,6 +50,8 @@ public:
     WEBCORE_EXPORT MachSendRight copySendRight() const;
     WEBCORE_EXPORT mach_port_t leakSendRight() WARN_UNUSED_RETURN;
 
+    explicit operator bool() const { return m_port != MACH_PORT_NULL; }
+
 private:
     explicit MachSendRight(mach_port_t);