Chromium Code Reviews| Index: ppapi/cpp/private/tcp_socket_private.cc |
| diff --git a/ppapi/cpp/private/tcp_socket_private.cc b/ppapi/cpp/private/tcp_socket_private.cc |
| index 9e2c1f6ac9136f4d919f288a3c9541fde950066b..5af22604212728a34f3e26b8edb7c26408c56541 100644 |
| --- a/ppapi/cpp/private/tcp_socket_private.cc |
| +++ b/ppapi/cpp/private/tcp_socket_private.cc |
| @@ -28,6 +28,13 @@ TCPSocketPrivate::TCPSocketPrivate(const InstanceHandle& instance) { |
| } |
| } |
|
ygorshenin1
2012/03/07 11:17:29
I'm still afraid, that if PPB_TCPSocket_Private in
yzshen1
2012/03/07 17:27:05
You could release it using ReleaseResource() in pp
ygorshenin1
2012/03/07 17:40:40
Sure, but how to notify user about that?
On 2012/
yzshen1
2012/03/07 17:56:49
is_null() will be true.
If the user expects the r
brettw
2012/03/08 18:47:17
I'd just delete the if and call the default resour
ygorshenin1
2012/03/11 09:39:33
Done.
|
| +TCPSocketPrivate::TCPSocketPrivate(PassRef, PP_Resource resource) { |
| + if (has_interface<PPB_TCPSocket_Private>() && |
| + get_interface<PPB_TCPSocket_Private>()->IsTCPSocket(resource)) { |
| + PassRefFromConstructor(resource); |
| + } |
| +} |
| + |
| // static |
| bool TCPSocketPrivate::IsAvailable() { |
| return has_interface<PPB_TCPSocket_Private>(); |