Closed Bug 21643 Opened 25 years ago Closed 24 years ago

xpconnect root wrapper scheme is funky

Categories

(Core :: XPConnect, defect, P3)

All
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.1

People

(Reporter: waterson, Assigned: jband_mozilla)

References

Details

Attachments

(1 file)

...in a corner case where a "root" wrapper and a "real" wrapper need to be constructed at the same time.
Attached patch sloppy fixSplinter Review
N.B. that the first two parts of the patch is irrelevant, and is simply meant to more clearly balance the way that the root wrapper is released in the dtor. The second part of the patch is the sauce.
I *think* I found another leak here too. Although I'm not positive. In xpconvert::JSData2Native, we make a call to GetNative which looks to me like it ref counts the natvie object before it returns the native object. But there is no appropriate release in this method. I added a release in that code and our leak count went down by a little bit. (Didn't solve the xul document leak though). I'll attach another patch with this leak fix too. I'm hoping shaver or jband can help verify that we do need to release the object returned by GetNative.
Blocks: 21364
Status: NEW → ASSIGNED
I'll look at waterson's patch. I can see for sure that the case that mscott refers to in xpcconvert is not a leak. This is calling nsXPCWrappedNative::GetNative with no param which is the inlined method with no addref: http://lxr.mozilla.org/seamonkey/source/js/src/xpconnect/src/xpcprivate.h#822
jband: I'd like to land this fix, or something like it, when the tree opens. what say you?
go for it
hacky fix checked in. jband, leaving this assigned to you as you were gonna rewrite this all RSN, anyway.
Depends on: 22305
Keywords: mlk
changing bug title from... [MLK] XPConnect leaks native "root" wrapper ...to... xpconnect root wrapper scheme is funky And, I removed the 'mlk' keyword 'cuz it doesn't leak anymore. I'll revisit this later when this scheme is rewritten for flattening, etc.
Keywords: mlk
Summary: [MLK] XPConnect leaks native "root" wrapper → xpconnect root wrapper scheme is funky
This bug has not been touched for more than nine months. In most cases, that means it has "slipped through the net". Please could the owner take a moment to add a comment to the bug with current status, and/or close it. Thank you :-) Gerv
Target Milestone: --- → mozilla0.9.1
flattening changes in xpcdom branch will fix this.
fixed by XPCDOM_20010329_BRANCH landing
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: