Closed Bug 227963 Opened 20 years ago Closed 20 years ago

[gtk2] native window code leaks

Categories

(Core Graveyard :: Plug-ins, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: blizzard, Assigned: blizzard)

References

Details

(Keywords: memory-leak)

Attachments

(1 file)

There's a leak in the native gtk2 window code.  This causes a lot of problems
during destruction.  Will attach a patch in a moment.
Attached patch patchSplinter Review
Should be using an nsCOMPtr<> as well as using getter_AddRefs().
Attachment #137146 - Flags: superreview?(bryner)
Attachment #137146 - Flags: review?(robin.lu)
Severity: normal → critical
Keywords: mlk
seems like the leak comes from the java plugin checking code. Add related people
to the cc list.
Robin,

> seems like the leak comes from the java plugin checking code
Could you elaborate your speculation?
Comment on attachment 137146 [details] [diff] [review]
patch

It is a little strange that we have to handle the plug_removed. I have checked
the code of gtksocket, seems like they need to provide a default value as true
to the result before emit the signal plug_remove.  It could be a bug of
gtksocket. Anyway, this patch is OK to me.
Attachment #137146 - Flags: review?(robin.lu) → review+
Xiaobin,

You can have a look of the patch attached by Blizzard. 
Wouldn't it be nicer if AddRef called from nsIPluginInstance::GetPeer function?
I talked to own about the default for plug_removed because I thought it was odd
as well.  He says that this was the behaviour of gtk 1.2, so it's preserved in
the gtk2 code to maintain compatibility.
Status: NEW → ASSIGNED
Assignee: peterlubczynski-bugs → blizzard
Status: ASSIGNED → NEW
Attachment #137146 - Flags: superreview?(bryner) → superreview+
Comment on attachment 137146 [details] [diff] [review]
patch

Good solid leak fix for 1.6 to let people write gtk2 plugins.
Attachment #137146 - Flags: approval1.6?
Comment on attachment 137146 [details] [diff] [review]
patch

a=asa (on behalf of drivers) for checkin to Mozilla 1.6
Attachment #137146 - Flags: approval1.6? → approval1.6+
Checked in before 1.6.  Thanks!
Fixed.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.