Closed Bug 391912 Opened 18 years ago Closed 12 years ago

class reflections table never freed if java VM not loaded

Categories

(Core Graveyard :: Java: OJI, defect)

x86
Windows XP
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: dbaron, Unassigned)

Details

(Keywords: memory-leak)

When starting up Firefox (with about:blank) and shutting it down, I see two allocations leaked (the table and its storage) from the stack: JSJ_NewHashTable[jsj3250 +0xF76C] jsj_InitJavaClassReflectionsTable[jsj3250 +0xC693] jsj_init_JavaClass[jsj3250 +0x7C9E] JSJ_InitJSContext[jsj3250 +0x1B04] nsJVMManager::InitLiveConnectClasses[oji +0x6452] nsJSContext::InitializeLiveConnectClasses[gklayout +0x406C45] nsJSContext::InitClasses[gklayout +0x408800] nsJSContext::InitContext[gklayout +0x406AB3] nsGlobalWindow::SetScriptContext[gklayout +0x3E0F7B] This seems to be because the table is allocated at the above stack, but JSJ_DisconnectFromJavaVM only frees it if java_vm is non-NULL.
Actually, there's a second allocation not freed: JSJ_ConnectToJavaVM[jsj3250 +0x1982] nsJVMManager::MaybeStartupLiveConnect[oji +0x7151] nsJVMManager::StartupLiveConnect[oji +0x5F9E] nsJSRuntime::Init[gklayout +0x409763] which makes me think the problem may just be that we never call nsJVMManager::MaybeShutdownLiveConnect.
Component: Java: Live Connect → Java: OJI
QA Contact: live-connect → java.oji
(In reply to comment #1) > which makes me think the problem may just be that we never call > nsJVMManager::MaybeShutdownLiveConnect. That seems likely: nsJSRuntime::Init() calls StartupLiveConnect, but nsJSRuntime::ShutDown doesn't call ShutdownLiveConnect.
Product: Core → Core Graveyard
Mass-closing bugs in the "OJI" component: OJI plugin integration was replaced with npruntime long ago, and these bugs appear to be irrelevant now. If there is in fact a real bug that remains, please file it new in the "Core" product, component "Plug-ins".
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.