Closed
Bug 379727
Opened 17 years ago
Closed 17 years ago
JavaMember should define trace/mark instead of using AddNamedRoot
Categories
(Core Graveyard :: Java: Live Connect, defect)
Core Graveyard
Java: Live Connect
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: igor, Assigned: igor)
Details
Attachments
(1 file, 1 obsolete file)
2.80 KB,
patch
|
alfred.peng
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
Currently js/src/liveconnect/jsj_JavaMember.c defines JavaMember JS class that use explicit AddNamedRoot/RemoveRoot API for managing its roots with RemoveRoot called from the finalizer. Besides being eneficient, this can lead to leak when a JS object is stored inside Java entity. So the class should implement the standard trace/mark method instead.
Assignee | ||
Comment 1•17 years ago
|
||
The patch implements the trace method to replace explicit root management.
Attachment #263733 -
Flags: superreview?(alfred.peng)
Attachment #263733 -
Flags: review?(brendan)
Comment 2•17 years ago
|
||
Comment on attachment 263733 [details] [diff] [review] fix v1 sr=me contingent upon r=alfred, since alfred is not an SR and is indeed the module owner. /be
Attachment #263733 -
Flags: superreview?(alfred.peng)
Attachment #263733 -
Flags: superreview+
Attachment #263733 -
Flags: review?(brendan)
Attachment #263733 -
Flags: review?(alfred.peng)
Assignee | ||
Comment 3•17 years ago
|
||
In the previous patch I missed the fact that class prototype instance of JavaMember does not have private data so the trace must check for that. When I build a browser with liveconnect enabled, it exposed the problem instantly.
Attachment #263733 -
Attachment is obsolete: true
Attachment #263920 -
Flags: superreview?(brendan)
Attachment #263920 -
Flags: review?(alfred.peng)
Attachment #263733 -
Flags: review?(alfred.peng)
Comment 4•17 years ago
|
||
Comment on attachment 263920 [details] [diff] [review] fix v2 Oops, I should have seen that one coming... /be
Attachment #263920 -
Flags: superreview?(brendan) → superreview+
Comment 5•17 years ago
|
||
Comment on attachment 263920 [details] [diff] [review] fix v2 Looks fine for me. Thanks for the patch. r=alfred.
Attachment #263920 -
Flags: review?(alfred.peng) → review+
Assignee | ||
Comment 6•17 years ago
|
||
I committed the patch from comment 3 to the trunk: Checking in liveconnect/jsj_JavaMember.c; /cvsroot/mozilla/js/src/liveconnect/jsj_JavaMember.c,v <-- jsj_JavaMember.c new revision: 1.18; previous revision: 1.17 done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•