Closed
Bug 1480624
Opened 6 years ago
Closed 6 years ago
Run complex type destructors in xpconnect
Categories
(Core :: XPConnect, enhancement, P2)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: nika, Assigned: nika)
References
Details
Attachments
(2 files)
XPConnect currently handles UntypedTArray objects by clearing them to an EmptyHdr() state, and then simply dropping the memory. Unfortunately, this doesn't work with our leakchecker, as it increments a counter in the constructor, and then the destructor is never run.
These patches cause XPConnect to run destructors for complex types before freeing backing memory.
Assignee | ||
Comment 1•6 years ago
|
||
This macro simplifies code which allows performing an operation on or
extracting information from a particular nsXPTType's native representation.
It is also used in part 2 to implement xpc::DestructValue.
Assignee | ||
Comment 2•6 years ago
|
||
DestructValue acts a lot like CleanupValue, however in addition to normal
cleanup work, it invokes the destructor of complex data types. This is important
to ensure that constructors and destructors are matched for these complex data
types.
CleanupValue is also used to clean up a value without destructing it, so cannot
be modified in-place.
Depends On D2689
Comment 3•6 years ago
|
||
Comment on attachment 8997221 [details]
Bug 1480624 - Part 1: Add XPT_FOR_EACH_*_TYPE macros to xptinfo.h, r=mccr8
Andrew McCreight [:mccr8] (away Aug 6 - 10) has approved the revision.
https://phabricator.services.mozilla.com/D2689
Attachment #8997221 -
Flags: review+
Comment 4•6 years ago
|
||
Comment on attachment 8997223 [details]
Bug 1480624 - Part 2: Add a DestructValue method to XPConnect to run XPT Type destructors, r=mccr8
Andrew McCreight [:mccr8] (away Aug 6 - 10) has approved the revision.
https://phabricator.services.mozilla.com/D2690
Attachment #8997223 -
Flags: review+
Updated•6 years ago
|
Priority: -- → P2
Pushed by nika@thelayzells.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6c314f9378ad
Part 1: Add XPT_FOR_EACH_*_TYPE macros to xptinfo.h, r=mccr8
https://hg.mozilla.org/integration/mozilla-inbound/rev/8376dfb0af82
Part 2: Add a DestructValue method to XPConnect to run XPT Type destructors, r=mccr8
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6c314f9378ad
https://hg.mozilla.org/mozilla-central/rev/8376dfb0af82
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•