aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Bhole <[email protected]>2011-01-20 11:06:41 -0500
committerDeepak Bhole <[email protected]>2011-01-20 11:06:41 -0500
commitef785a49ec6f4dd970098f9a2a0ed7d69c7390c2 (patch)
tree6c6e465dbd4d7f9b7df87c70782427be0e74a340
parent63a8b837179b933d7cf9a2ae08de63b1c7c88439 (diff)
Fix PR619: Improper finalization by the plugin can crash the browser
-rw-r--r--ChangeLog6
-rw-r--r--NEWS1
-rw-r--r--plugin/icedteanp/java/netscape/javascript/JSObject.java5
3 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5bc6f42..0d1c200 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-01-20 Deepak Bhole <[email protected]>
+
+ PR619: Improper finalization by the plugin can crash the browser
+ * plugin/icedteanp/java/netscape/javascript/JSObject.java (finalize):
+ Proceed with finalization only if JSObject is valid.
+
2011-01-17 Andrew Su <[email protected]>
* netx/net/sourceforge/jnlp/NetxPanel.java:
diff --git a/NEWS b/NEWS
index eb6391e..7c46873 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@ New in release 1.0 (2010-XX-XX):
- PR565: UIDefaults.getUI fails with jgoodies:looks 2.3.1
- PR593: Increment of invalidated iterator in IcedTeaPluginUtils (patch from [email protected])
- PR597: Entities are parsed incorrectly in PARAM tag in applet plugin
+ - PR619: Improper finalization by the plugin can crash the browser
- Applets are now double-buffered to eliminate flicker in ones that do heavy drawing
- RH665104: OpenJDK Firefox Java plugin loses a cookie
* NetX
diff --git a/plugin/icedteanp/java/netscape/javascript/JSObject.java b/plugin/icedteanp/java/netscape/javascript/JSObject.java
index 293f2be..a5bf41f 100644
--- a/plugin/icedteanp/java/netscape/javascript/JSObject.java
+++ b/plugin/icedteanp/java/netscape/javascript/JSObject.java
@@ -259,6 +259,11 @@ public final class JSObject {
* JavaScript object.
*/
protected void finalize() {
+
+ // Proceed if this is a valid object (0L == default long == invalid)
+ if (internal == 0L)
+ return;
+
PluginDebug.debug("JSObject.finalize ");
PluginAppletViewer.JavaScriptFinalize(internal);
}