Index: remoting/host/plugin/host_plugin_utils.cc |
diff --git a/remoting/host/plugin/host_plugin_utils.cc b/remoting/host/plugin/host_plugin_utils.cc |
index 1c09327d9bfdb6c7b2308000514e9e3d0f677ec5..f17cdccbeb3ecf75c3641d61e97d7283c24d8459 100644 |
--- a/remoting/host/plugin/host_plugin_utils.cc |
+++ b/remoting/host/plugin/host_plugin_utils.cc |
@@ -42,6 +42,12 @@ NPObject* ObjectFromNPVariant(const NPVariant& variant) { |
ScopedRefNPObject::ScopedRefNPObject() : object_(NULL) { } |
+ScopedRefNPObject::ScopedRefNPObject(NPObject* object) : object_(object) { |
Sergey Ulanov
2011/08/30 00:53:08
nit: move member initialization to the next line.
Lambros
2011/08/30 01:49:26
Done.
|
+ if (object) { |
+ g_npnetscape_funcs->retainobject(object); |
+ } |
+} |
+ |
Jamie
2011/08/30 00:43:34
When I write objects where the ctor and operator=
Sergey Ulanov
2011/08/30 00:53:08
I suppose this will not work because of DISALLOW_C
Jamie
2011/08/30 00:57:55
It should work because the parameter is an NPObjec
Lambros
2011/08/30 01:49:26
Done.
|
ScopedRefNPObject::~ScopedRefNPObject() { |
*this = NULL; |
} |