[rfc][icedtea-web] Java -> Javascript object leak tests
Adam Domurad
adomurad at redhat.com
Thu Aug 29 10:19:20 PDT 2013
Final patch of my internship :-)
I've tested this one pretty thoroughly, hopefully it is suitable.
To test it, apply the two previous patches (the test + test fixes). The
unit tests and reproducer should then pass.
Here are the fixes:
ChangLog:
2013-XX-XX Adam Domurad <adomurad at redhat.com>
* plugin/icedteanp/IcedTeaJavaRequestProcessor.cc: Fix Java object
reference leaks in many methods.
* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc: Same.
* plugin/icedteanp/IcedTeaJavaRequestProcessor.h
(NPObjectRef): Force explicit construction.
(object_map): Make NPObject references 'weak'.
* plugin/icedteanp/IcedTeaPluginUtils.cc: Update object_map
usage for
new 'weak' references.
* plugin/icedteanp/IcedTeaPluginUtils.h: Same.
* plugin/icedteanp/IcedTeaScriptablePluginObject.cc: Minor cleanup,
fix accidental retain caused by implicit NPObjectRef construction.
* plugin/icedteanp/IcedTeaScriptablePluginObject.h: Free Java
object
references on deallocation.
* plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
(handleMessage): Don't create a new object reference when passed an
existing object.
(store): Now returns reference.
(freeIdentifier): New, convenience method for freeing identifier.
* plugin/icedteanp/java/sun/applet/PluginAppletViewer.java:
(call): Cleanup, fix Java string reference leak
Cheers & bye for now,
-Adam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Java-Object-Freeing.patch
Type: text/x-patch
Size: 41845 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130829/162f68a9/Java-Object-Freeing.patch
More information about the distro-pkg-dev
mailing list