Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1219)

Unified Diff: remoting/host/plugin/host_plugin_utils.cc

Issue 10024025: Use ScopedRefNPObject to pass NPObjects in the host plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/plugin/host_plugin_utils.h ('k') | remoting/host/plugin/host_script_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c1682c4b8f1425986dfbf00ab07a5926927f8c0e..c2bbe33cc8bfeec0152c04458940f4de51df934f 100644
--- a/remoting/host/plugin/host_plugin_utils.cc
+++ b/remoting/host/plugin/host_plugin_utils.cc
@@ -47,6 +47,11 @@ ScopedRefNPObject::ScopedRefNPObject(NPObject* object)
*this = object;
}
+ScopedRefNPObject::ScopedRefNPObject(const ScopedRefNPObject& object)
+ : object_(NULL) {
+ *this = object.get();
Wez 2012/04/09 20:00:50 nit: Do you need get() here, since there's an oper
Sergey Ulanov 2012/04/09 20:06:32 Done.
+}
+
ScopedRefNPObject::~ScopedRefNPObject() {
*this = NULL;
}
@@ -62,4 +67,9 @@ ScopedRefNPObject& ScopedRefNPObject::operator=(NPObject* object) {
return *this;
}
+ScopedRefNPObject& ScopedRefNPObject::operator=(
+ const ScopedRefNPObject& object) {
+ return *this = object.get();
+}
+
} // namespace remoting
« no previous file with comments | « remoting/host/plugin/host_plugin_utils.h ('k') | remoting/host/plugin/host_script_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698