Code: uint32 ResourceTracker::GetLiveObjectsForInstance(
    PP_Instance instance) const {
   InstanceMap::const_iterator found = instance_map_.find(instance);
   if (found == instance_map_.end())
     return 0;
  return static_cast<uint32>(found->second->resources.size() +
                              found->second->object_vars.size());
 }

Commit Message: Maintain a map of all resources in the resource tracker and clear instance back pointers when needed,

BUG=85808
Review URL: http://codereview.chromium.org/7196001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89746 0039d316-1c4b-4281-b951-d872f2087c98
CWE ID: CWE-399
uint32 ResourceTracker::GetLiveObjectsForInstance(
    PP_Instance instance) const {
   InstanceMap::const_iterator found = instance_map_.find(instance);
   if (found == instance_map_.end())
     return 0;
  return static_cast<uint32>(found->second->ref_resources.size() +
                              found->second->object_vars.size());
 }
