Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339149

Summary: Memory leak when attaching events to the Mozilla DOM via XPCOM
Product: [Eclipse Project] Platform Reporter: Preet Shihn <pshihn>
Component: SWTAssignee: Grant Gayed <grant_gayed>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3    
Version: 4.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Preet Shihn CLA 2011-03-07 17:18:14 EST
Build Identifier: M20100909-0800

If you attach an event handler to the nsiDOMDocument object obtained from the mozilla browser, and then remove the handler; the native code holds on to the handler and does not release it - causing a memory leak

This happens on in Xulrunner 1.9.x
It did not happen in 1.8.x

Sample code to demonstrate this issue to follow... (I'm working on creating it)

Reproducible: Always

Steps to Reproduce:
1. get the nsiDOMDocument from the mozilla browser
2. Attach, say, a focus listener to the browser
3. Remove the focus listener
4. The listener is never released.
Comment 1 Grant Gayed CLA 2011-04-14 15:41:00 EDT
To confirm, you mean with JavaXPCOM (not XPCOM), right?  And if so, wouldn't this likely be a bug in XULRunner or JavaXPCOM?  The Browser does not use nsIDOMDocument anywhere that I can think of.
Comment 2 Alexander Kurtakov CLA 2017-07-04 13:38:13 EDT
Mozilla support is removed in 4.8.