[MLK] LiveConnect leaks JSJHashtable java_class_reflections

VERIFIED FIXED

Status

Core Graveyard
Java: Live Connect
P3
normal
VERIFIED FIXED
18 years ago
7 years ago

People

(Reporter: Patrick C. Beard, Assigned: rogerl (gone))

Tracking

({mlk})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta3+], URL)

(Reporter)

Description

18 years ago
See the blame URL above, when jsj_InitJavaClassReflectionsTable() gets called 
multiple times, it overwrites java_class_reflections. Here's a patch to fix it:

Index: mozilla/js/src/liveconnect/jsj_class.c
===================================================================
RCS file: /cvsroot/mozilla/js/src/liveconnect/jsj_class.c,v
retrieving revision 1.13
diff -b -c -2 -r1.13 jsj_class.c
*** jsj_class.c	2000/06/23 02:28:05	1.13
--- jsj_class.c	2000/07/13 20:54:11
***************
*** 726,729 ****
--- 726,730 ----
  jsj_InitJavaClassReflectionsTable()
  {
+     if (!java_class_reflections) {
          java_class_reflections =
              JSJ_NewHashTable(64, jsj_HashJavaObject, jsj_JavaObjectComparator,
***************
*** 744,747 ****
--- 745,749 ----
              return JS_FALSE;
  #endif
+     }
      
      return JS_TRUE;
Keywords: mlk
(Assignee)

Comment 1

18 years ago
[SPAM] Bug triage for nsbeta3
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Keywords: patch
Nominating for nsbeta3 and clearing Future milestone for reevaluation.  This
should be fix because:
 1) It's a real leak
 2) It adds a good bit of noise to leak reports
 3) There's a trivial patch attached (which may or may not be right)
 4) There could be other bugs caused by this code.
Keywords: nsbeta3
Target Milestone: Future → ---
(Reporter)

Comment 3

18 years ago
Low risk fix.
Whiteboard: [nsbeta3+]
(Assignee)

Comment 4

18 years ago
Fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 5

18 years ago
Verifying -
Status: RESOLVED → VERIFIED

Updated

7 years ago
Component: Java: Live Connect → Java: Live Connect
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.