diff options
Diffstat (limited to 'webkit/glue/plugins/pepper_resource_tracker.cc')
-rw-r--r-- | webkit/glue/plugins/pepper_resource_tracker.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/webkit/glue/plugins/pepper_resource_tracker.cc b/webkit/glue/plugins/pepper_resource_tracker.cc index 2e18cd8..ba6f8f0 100644 --- a/webkit/glue/plugins/pepper_resource_tracker.cc +++ b/webkit/glue/plugins/pepper_resource_tracker.cc @@ -9,7 +9,7 @@ #include "base/logging.h" #include "base/rand_util.h" -#include "third_party/ppapi/c/pp_resource.h" +#include "ppapi/c/pp_resource.h" #include "webkit/glue/plugins/pepper_resource.h" namespace pepper { @@ -66,6 +66,16 @@ bool ResourceTracker::UnrefResource(PP_Resource res) { } } +void ResourceTracker::ForceDeletePluginResourceRefs(PP_Resource res) { + ResourceMap::iterator i = live_resources_.find(res); + if (i != live_resources_.end()) + return; // Nothing to do. + + i->second.second = 0; + i->second.first->StoppedTracking(); + live_resources_.erase(i); +} + uint32 ResourceTracker::GetLiveObjectsForModule(PluginModule* module) const { // Since this is for testing only, we'll just go through all of them and // count. |