summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-18 19:41:30 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-18 19:41:30 +0000
commitedb5b05700f53fb7b1827727777cc15b50370ccb (patch)
tree4cc0fc0bf581503e6fd273a037a63353ca41bf9c /ppapi/shared_impl
parentdc20acdfb4026b23709beec34a187dfde58af437 (diff)
downloadchromium_src-edb5b05700f53fb7b1827727777cc15b50370ccb.zip
chromium_src-edb5b05700f53fb7b1827727777cc15b50370ccb.tar.gz
chromium_src-edb5b05700f53fb7b1827727777cc15b50370ccb.tar.bz2
Actually free plugin implement vars when running out of process when the
plugin holds a reference beyond the lifetime of the instance. Review URL: https://chromiumcodereview.appspot.com/10542150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl')
-rw-r--r--ppapi/shared_impl/test_globals.h2
-rw-r--r--ppapi/shared_impl/var_tracker.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/ppapi/shared_impl/test_globals.h b/ppapi/shared_impl/test_globals.h
index 2fa2192..3675347 100644
--- a/ppapi/shared_impl/test_globals.h
+++ b/ppapi/shared_impl/test_globals.h
@@ -20,6 +20,8 @@ class TestVarTracker : public VarTracker {
virtual ArrayBufferVar* CreateArrayBuffer(uint32 size_in_bytes) OVERRIDE {
return NULL;
}
+ virtual void DidDeleteInstance(PP_Instance instance) OVERRIDE {
+ }
};
// Implementation of PpapiGlobals for tests that don't need either the host- or
diff --git a/ppapi/shared_impl/var_tracker.h b/ppapi/shared_impl/var_tracker.h
index 9ab22f2..b873250 100644
--- a/ppapi/shared_impl/var_tracker.h
+++ b/ppapi/shared_impl/var_tracker.h
@@ -11,6 +11,7 @@
#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
+#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_var.h"
#include "ppapi/shared_impl/ppapi_shared_export.h"
@@ -84,6 +85,9 @@ class PPAPI_SHARED_EXPORT VarTracker
int GetRefCountForObject(const PP_Var& object);
int GetTrackedWithNoReferenceCountForObject(const PP_Var& object);
+ // Called after an instance is deleted to do var cleanup.
+ virtual void DidDeleteInstance(PP_Instance instance) = 0;
+
protected:
struct VarInfo {
VarInfo();