| Index: webkit/plugins/ppapi/host_var_tracker.h
|
| diff --git a/webkit/plugins/ppapi/host_var_tracker.h b/webkit/plugins/ppapi/host_var_tracker.h
|
| index fb743fc32a4300310b9da9cb433c16354472ed05..7bfb754080b30ae1cf57ae9e884a24b036b1fcd4 100644
|
| --- a/webkit/plugins/ppapi/host_var_tracker.h
|
| +++ b/webkit/plugins/ppapi/host_var_tracker.h
|
| @@ -14,6 +14,7 @@
|
| #include "base/memory/linked_ptr.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "ppapi/c/pp_instance.h"
|
| #include "ppapi/c/pp_resource.h"
|
| #include "ppapi/shared_impl/function_group_base.h"
|
| @@ -66,7 +67,12 @@ class HostVarTracker : public ::ppapi::VarTracker {
|
| virtual ::ppapi::ArrayBufferVar* CreateArrayBuffer(
|
| uint32 size_in_bytes) OVERRIDE;
|
|
|
| - typedef std::map<NPObject*, ::ppapi::NPObjectVar*> NPObjectToNPObjectVarMap;
|
| + // Clear the reference count of the given object and remove it from
|
| + // live_vars_.
|
| + void ForceReleaseNPObject(const base::WeakPtr< ::ppapi::NPObjectVar>& object);
|
| +
|
| + typedef std::map<NPObject*, base::WeakPtr< ::ppapi::NPObjectVar> >
|
| + NPObjectToNPObjectVarMap;
|
|
|
| // Lists all known NPObjects, first indexed by the corresponding instance,
|
| // then by the NPObject*. This allows us to look up an NPObjectVar given
|
|
|