aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Domurad <[email protected]>2012-12-20 11:11:05 -0500
committerAdam Domurad <[email protected]>2012-12-20 11:11:05 -0500
commita07ec4dbc1b8d24edc6a2cd3f8a878adc54bffdb (patch)
tree2c5a8d96f3b355471cbdfbf88f6f5f6dea00c8c7
parent04a95e4790705edd9d0997db94176dc19f326729 (diff)
Fix 2 memory leaks, pass corresponding C++ unit tests
-rw-r--r--ChangeLog6
-rw-r--r--plugin/icedteanp/IcedTeaScriptablePluginObject.cc4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index fe204c0..cd6ae39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2012-12-20 Adam Domurad <[email protected]>
+ * plugin/icedteanp/IcedTeaScriptablePluginObject.cc
+ (IcedTeaScriptableJavaObject::deAllocate): Fix memory leak
+ (IcedTeaScriptableJavaPackageObject::deAllocate): Fix memory leak
+
+2012-12-20 Adam Domurad <[email protected]>
+
* tests/cpp-unit-tests/browser_mock.cc
(mock_retainobject): New, mocks behaviour of NPAPI retainobject
(mock_releaseobject): New, mocks behaviour of NPAPI releaseobject
diff --git a/plugin/icedteanp/IcedTeaScriptablePluginObject.cc b/plugin/icedteanp/IcedTeaScriptablePluginObject.cc
index 518fec6..347cb00 100644
--- a/plugin/icedteanp/IcedTeaScriptablePluginObject.cc
+++ b/plugin/icedteanp/IcedTeaScriptablePluginObject.cc
@@ -197,7 +197,7 @@ IcedTeaScriptableJavaPackageObject::getPackageName()
void
IcedTeaScriptableJavaPackageObject::deAllocate(NPObject *npobj)
{
- browser_functions.releaseobject(npobj);
+ delete (IcedTeaScriptableJavaPackageObject*)npobj;
}
void
@@ -489,7 +489,7 @@ IcedTeaScriptableJavaObject::setIsArray(bool isArray)
void
IcedTeaScriptableJavaObject::deAllocate(NPObject *npobj)
{
- browser_functions.releaseobject(npobj);
+ delete (IcedTeaScriptableJavaObject*)npobj;
}
void