diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-08 17:11:41 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-08 17:11:41 +0000 |
commit | 02712874c2d623d1dd41c0b3350b769d2855b9f2 (patch) | |
tree | 7205e95c9ceb2cb33162b68621ac04d6ce0e1715 /ppapi/utility | |
parent | 46e2912bee9e94634cf3c99c80766ea4a02a4744 (diff) | |
download | chromium_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 'ppapi/utility')
-rw-r--r-- | ppapi/utility/private/network_list_observer_private.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ppapi/utility/private/network_list_observer_private.cc b/ppapi/utility/private/network_list_observer_private.cc index f41e81b..1969ee1 100644 --- a/ppapi/utility/private/network_list_observer_private.cc +++ b/ppapi/utility/private/network_list_observer_private.cc @@ -26,9 +26,8 @@ void NetworkListObserverPrivate::NetworkListCallbackHandler( PP_Resource list_resource) { NetworkListObserverPrivate* object = static_cast<NetworkListObserverPrivate*>(user_data); - NetworkListPrivate list(list_resource); + NetworkListPrivate list(PASS_REF, list_resource); object->OnNetworkListChanged(list); - Module::Get()->core()->ReleaseResource(list_resource); } } // namespace pp |