diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-16 22:34:22 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-16 22:34:22 +0000 |
commit | 13e343c565819075ce1eef5a001c875c795f7c33 (patch) | |
tree | b6a9e03b6b77fef5d9d5a09101da1c25ff86487e /ppapi/tests/test_case.h | |
parent | b86aad87785f4cdeaf9839619b2d1cc7e32e2f7f (diff) | |
download | chromium_src-13e343c565819075ce1eef5a001c875c795f7c33.zip chromium_src-13e343c565819075ce1eef5a001c875c795f7c33.tar.gz chromium_src-13e343c565819075ce1eef5a001c875c795f7c33.tar.bz2 |
Re-land http://codereview.chromium.org/9403039/, r124106
Original description:
"""
PPAPI: Really force-free NPObjects on Instance destruction.
(There still seems to be a memory leak with this patch; I may have to check our NPObject reference counting next.)
BUG=114023
TEST=
"""
BUG=114023
TEST=
TBR=dmichael@chromium.org
Review URL: http://codereview.chromium.org/9564024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127273 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/tests/test_case.h')
-rw-r--r-- | ppapi/tests/test_case.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ppapi/tests/test_case.h b/ppapi/tests/test_case.h index abd6c62..b4815a1 100644 --- a/ppapi/tests/test_case.h +++ b/ppapi/tests/test_case.h @@ -7,6 +7,7 @@ #include <cmath> #include <limits> +#include <set> #include <string> #include "ppapi/c/pp_resource.h" @@ -70,10 +71,16 @@ class TestCase { // that want to handle view changes should override this method. virtual bool HandleInputEvent(const pp::InputEvent& event); + void IgnoreLeakedVar(int64_t id); + + TestingInstance* instance() { return instance_; } + + const PPB_Testing_Dev* testing_interface() { return testing_interface_; } + protected: #if !(defined __native_client__) // Overridden by each test to supply a ScriptableObject corresponding to the - // test. There can only be one object created for all test in a given class + // test. There can only be one object created for all tests in a given class, // so be sure your object is designed to be re-used. // // This object should be created on the heap. Ownership will be passed to the @@ -108,6 +115,9 @@ class TestCase { bool force_async_; private: + // Var ids that should be ignored when checking for leaks on shutdown. + std::set<int64_t> ignored_leaked_vars_; + #if !(defined __native_client__) // Holds the test object, if any was retrieved from CreateTestObject. pp::VarPrivate test_object_; |