summaryrefslogtreecommitdiffstats
path: root/remoting/client
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-08 17:11:41 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-08 17:11:41 +0000
commit02712874c2d623d1dd41c0b3350b769d2855b9f2 (patch)
tree7205e95c9ceb2cb33162b68621ac04d6ce0e1715 /remoting/client
parent46e2912bee9e94634cf3c99c80766ea4a02a4744 (diff)
downloadchromium_src-02712874c2d623d1dd41c0b3350b769d2855b9f2.zip
chromium_src-02712874c2d623d1dd41c0b3350b769d2855b9f2.tar.gz
chromium_src-02712874c2d623d1dd41c0b3350b769d2855b9f2.tar.bz2
Pepper: Make users of pp:NetworkMonitorPrivate less likely to leak resources.
a) Make NetworkListPrivate's constructor (that takes a PP_Resource) take ownership of that resource. b) Add an explicit PASS_REF to that constructor, to make its semantics clear. TEST=PPAPI tests Review URL: https://chromiumcodereview.appspot.com/10381002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135856 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client')
-rw-r--r--remoting/client/plugin/pepper_network_manager.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/remoting/client/plugin/pepper_network_manager.cc b/remoting/client/plugin/pepper_network_manager.cc
index 20dbd43..b9c8c72 100644
--- a/remoting/client/plugin/pepper_network_manager.cc
+++ b/remoting/client/plugin/pepper_network_manager.cc
@@ -44,9 +44,8 @@ void PepperNetworkManager::OnNetworkListCallbackHandler(
void* user_data,
PP_Resource list_resource) {
PepperNetworkManager* object = static_cast<PepperNetworkManager*>(user_data);
- pp::NetworkListPrivate list(list_resource);
+ pp::NetworkListPrivate list(pp::PASS_REF, list_resource);
object->OnNetworkList(list);
- pp::Module::Get()->core()->ReleaseResource(list_resource);
}
void PepperNetworkManager::OnNetworkList(const pp::NetworkListPrivate& list) {