diff options
author | Jiri Vanek <[email protected]> | 2014-01-15 15:11:22 +0100 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2014-01-15 15:11:22 +0100 |
commit | f72f4619b8b18245e7314073955454d3a807ac68 (patch) | |
tree | d2c13903125b072223d5997f558406bb5a6d6935 | |
parent | 4ca7239b9224fde0a8998b5fa760eb6d12a72a77 (diff) |
Fixed memory leak detector to correctly handle pre_init_messages queue.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | plugin/icedteanp/IcedTeaPluginUtils.cc | 4 | ||||
-rw-r--r-- | plugin/icedteanp/IcedTeaPluginUtils.h | 1 | ||||
-rw-r--r-- | tests/cpp-unit-tests/MemoryLeakDetector.h | 2 |
4 files changed, 16 insertions, 0 deletions
@@ -1,3 +1,12 @@ +2014-01-15 Jiri Vanek <[email protected]> + + Fixed memory leak detector to correctly handle pre_init_messages queue. + * plugin/icedteanp/IcedTeaPluginUtils.cc: implemented (reset_pre_init_messages) + method. + * plugin/icedteanp/IcedTeaPluginUtils.h: declared (reset_pre_init_messages). + * tests/cpp-unit-tests/MemoryLeakDetector.h: (reset_global_state) called + (reset_pre_init_messages). + 2014-01-09 Andrew Azores <[email protected]> * html-gen.sh: made more idiomatic and removed some bashisms diff --git a/plugin/icedteanp/IcedTeaPluginUtils.cc b/plugin/icedteanp/IcedTeaPluginUtils.cc index 5cd4231..35feaab 100644 --- a/plugin/icedteanp/IcedTeaPluginUtils.cc +++ b/plugin/icedteanp/IcedTeaPluginUtils.cc @@ -85,6 +85,10 @@ void push_pre_init_messages(char * ldm){ pthread_mutex_unlock(&debug_pipe_lock); } +void reset_pre_init_messages(){ + pre_jvm_message = std::queue<std::string>(); + } + /** * Given a context number, constructs a message prefix to send to Java * diff --git a/plugin/icedteanp/IcedTeaPluginUtils.h b/plugin/icedteanp/IcedTeaPluginUtils.h index 6967793..d65218a 100644 --- a/plugin/icedteanp/IcedTeaPluginUtils.h +++ b/plugin/icedteanp/IcedTeaPluginUtils.h @@ -68,6 +68,7 @@ exception statement from your version. */ void *flush_pre_init_messages(void* data); void push_pre_init_messages(char * ldm); +void reset_pre_init_messages(); // debugging macro. #define initialize_debug() \ diff --git a/tests/cpp-unit-tests/MemoryLeakDetector.h b/tests/cpp-unit-tests/MemoryLeakDetector.h index d457cb7..71e333e 100644 --- a/tests/cpp-unit-tests/MemoryLeakDetector.h +++ b/tests/cpp-unit-tests/MemoryLeakDetector.h @@ -75,6 +75,8 @@ public: IcedTeaPluginUtilities::clearInstanceIDs(); /* Clears allocations caused by storeObjectMapping */ IcedTeaPluginUtilities::clearObjectMapping(); + /*reset messages*/ + reset_pre_init_messages(); } int initial_cpp_allocations; |