Closed Bug 62590 Opened 24 years ago Closed 24 years ago

DOM leaks plugin host and cached plugins when doing about:plugins

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: sean, Assigned: serhunt)

References

()

Details

(Keywords: memory-leak)

http://lxr.mozilla.org/seamonkey/source/dom/src/base/nsJSNavigator.cpp#227 leaks nsIDOMPluginArray *prop. PluginArrayImpl (prop) addref's the plugin manager in it's ctor. By not releasing prop, the plugin manager is leaked as are all currently cached plugins (in the plugin manager's activePluginList). Because the manager's activePluginList is leaked, all the plugins in the list fail to receive Destroy() calls. In a debug build, the plugin mgr does a printf("killing plugin host\n") - this can be seen in the console when shutting down if you view a page that has an embed tag for an installed plugin. If you also do about:plugins, the line is not printed and the embedded plugin is leaked.
Keywords: mlk
My original assessment was incorrect. The cause of the leak is a problem in PluginArrayImpl::Refresh (nsPluginArray.cpp) - its GetService and ReleaseService calls for the plugin host are unbalanced. Patch attached to bug 61388 (http://bugzilla.mozilla.org/showattachment.cgi?attach_id=21908).
Reassigning to av@netscape.com since he's been poking around in this code lately.
Assignee: jst → av
The patch http://bugzilla.mozilla.org/showattachment.cgi?attach_id=23002 in bug 61388 will fix this. Marking dependency.
Status: NEW → ASSIGNED
Depends on: 61388
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Bug 61388 is fixed now in the trunk. Markin fixed.
vrfy
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.